From: Christoph Hellwig <hch@infradead.org>
To: Utako Kusaka <utako@tnes.nec.co.jp>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] Fix "quota -n" command in xfs_quota.
Date: Mon, 23 Apr 2007 22:26:06 +0100 [thread overview]
Message-ID: <20070423212606.GE13572@infradead.org> (raw)
In-Reply-To: <200704190837.AA05238@TNESG9305.tnes.nec.co.jp>
On Thu, Apr 19, 2007 at 05:37:11PM +0900, Utako Kusaka wrote:
> 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
Looks good to me, but the even the original code could be a little bit cleaner:
> --- 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];
if (!numeric) {
fs_project_t *p = getprprid(prid);
if (p)
return p->pr_name;
}
snprintf(buffer, sizeof(buffer), "#%u", (unsigned int)prid);
return &buffer[0];
next prev parent reply other threads:[~2007-04-23 21:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 8:37 [PATCH] Fix "quota -n" command in xfs_quota Utako Kusaka
2007-04-23 21:26 ` Christoph Hellwig [this message]
2007-04-24 6:10 ` Utako Kusaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070423212606.GE13572@infradead.org \
--to=hch@infradead.org \
--cc=utako@tnes.nec.co.jp \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox