Fix mount points enumeration (platform quota) on Solaris
Per documentation, `getmntent` returns 0 on success and -1 on error.
This commit is contained in:
parent
4f9d9ad92b
commit
6a15bc6742
|
@ -89,7 +89,7 @@ static char const* getdev(char const* path)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
while (getmntent(fp, &mnt))
|
||||
while (getmntent(fp, &mnt) != -1)
|
||||
{
|
||||
if (tr_strcmp0(path, mnt.mnt_mountp) == 0)
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ static char const* getfstype(char const* device)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
while (getmntent(fp, &mnt))
|
||||
while (getmntent(fp, &mnt) != -1)
|
||||
{
|
||||
if (tr_strcmp0(device, mnt.mnt_mountp) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue