]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_quota: don't try to report quotas which aren't there.
authorEric Sandeen <sandeen@sandeen.net>
Mon, 21 Feb 2011 18:12:50 +0000 (12:12 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 21 Feb 2011 18:12:50 +0000 (12:12 -0600)
Red Hat bug #669333 - xfs_quota generates "XFS_GETQUOTA: No such process" errors
shows that if you do this for a filesystem w/o group quota enabled:

# xfs_quota -x -c ' report -h ' /xfsquota"

You'll get this output:

User quota on /xfsquota (/dev/vdb)
                        Blocks
User ID      Used   Soft   Hard Warn/Grace

quota/report.c

index 0e005c36177e4a903ae289769f004b19881657a7..865359042d54ed70756332a35631144e0ccef3c8 100644 (file)
@@ -82,7 +82,7 @@ dump_file(
        fs_disk_quota_t d;
 
        if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0) {
-               if (errno != ENOENT && errno != ENOSYS)
+               if (errno != ENOENT && errno != ENOSYS && errno != ESRCH)
                        perror("XFS_GETQUOTA");
                return;
        }
@@ -302,7 +302,7 @@ report_mount(
        int             count;
 
        if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0) {
-               if (errno != ENOENT && errno != ENOSYS)
+               if (errno != ENOENT && errno != ENOSYS && errno != ESRCH)
                        perror("XFS_GETQUOTA");
                return 0;
        }