xfs
[Top] [All Lists]

[PATCH] Fix "quota -n" command in xfs_quota.

To: xfs@xxxxxxxxxxx
Subject: [PATCH] Fix "quota -n" command in xfs_quota.
From: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2007 17:37:11 +0900
Sender: xfs-bounce@xxxxxxxxxxx
Hi,

"quota -n" command in xfs_quota don't work when specifying the project id.
This patch fixes it.

Example:
# ./xfs_quota -x -c 'quota -p -n 42' ~utako/mpnt
Disk quotas for Project logfiles (42)
Filesystem              Blocks      Quota      Limit  Warn/Time      Mounted on
/dev/sda6                   52          0          0   00 [--------] 
/home/utako/mpnt


Signed-off-by: Utako Kusaka <utako@xxxxxxxxxxxxxx>
---

--- xfsprogs-2.8.20/quota/quota.orig    2007-04-18 10:36:38.000000000 +0900
+++ xfsprogs-2.8.20/quota/quota.c       2007-04-18 11:09:10.000000000 +0900
@@ -312,7 +312,7 @@ getprojectname(
        static char     buffer[32];
        fs_project_t    *p;
 
-       if ((p = getprprid(prid)))
+       if (!numeric && (p = getprprid(prid)))
                return p->pr_name;
        snprintf(buffer, sizeof(buffer), "#%u", (unsigned int)prid);
        return &buffer[0];


<Prev in Thread] Current Thread [Next in Thread>