From: Eric Sandeen <sandeen@sandeen.net>
To: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: linux-xfs@oss.sgi.com, Nathan Scott <nscott@aconex.com>
Subject: Re: [PATCH 6/6] xfs_quota: Fix range for -U.
Date: Mon, 15 Dec 2008 22:03:33 -0600 [thread overview]
Message-ID: <49472895.2050601@sandeen.net> (raw)
In-Reply-To: <1229369386-66312-6-git-send-email-arekm@maven.pl>
Arkadiusz Miskiewicz wrote:
> xfs_quota report "-L" option specifies lower range of requested IDs.
> "-U" specifies upper range but "-L" is closed range while "-U" is open
> range.
>
> Make "-U" closed range, too which is something more expected.
This seems like a good idea, although it changes behavior, and any
scripts that depended on this behavior will now get a different result.
Nathan, any thoughts? I think you put this in originally :)
-Eric
> ---
> xfsprogs/quota/report.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/xfsprogs/quota/report.c b/xfsprogs/quota/report.c
> index 21b4edb..2184158 100644
> --- a/xfsprogs/quota/report.c
> +++ b/xfsprogs/quota/report.c
> @@ -124,7 +124,7 @@ dump_limits_any_type(
> }
>
> if (upper) {
> - for (id = lower; id < upper; id++)
> + for (id = lower; id <= upper; id++)
> dump_file(fp, id, type, mount->fs_name);
> return;
> }
> @@ -398,7 +398,7 @@ report_user_mount(
> uint id;
>
> if (upper) { /* identifier range specified */
> - for (id = lower; id < upper; id++) {
> + for (id = lower; id <= upper; id++) {
> snprintf(n, sizeof(n)-1, "#%u", id);
> if (report_mount(fp, id, n,
> form, XFS_USER_QUOTA, mount, flags))
> @@ -436,7 +436,7 @@ report_group_mount(
> uint id;
>
> if (upper) { /* identifier range specified */
> - for (id = lower; id < upper; id++) {
> + for (id = lower; id <= upper; id++) {
> snprintf(n, sizeof(n)-1, "#%u", id);
> if (report_mount(fp, id, n,
> form, XFS_GROUP_QUOTA, mount, flags))
> @@ -473,7 +473,7 @@ report_project_mount(
> uint id;
>
> if (upper) { /* identifier range specified */
> - for (id = lower; id < upper; id++) {
> + for (id = lower; id <= upper; id++) {
> snprintf(n, sizeof(n)-1, "#%u", id);
> if (report_mount(fp, id, n,
> form, XFS_PROJ_QUOTA, mount, flags))
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2008-12-16 4:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 19:29 [PATCH 1/6] Polish translation update Arkadiusz Miskiewicz
2008-12-15 19:29 ` [PATCH 2/6] Fix build when gettext is enabled Arkadiusz Miskiewicz
2008-12-15 19:29 ` [PATCH 3/6] Apply gettext translation to strings kept in format->{fmt, msg, type} Arkadiusz Miskiewicz
2008-12-15 19:29 ` [PATCH 4/6] xfs_quota: Return non zero exit status in error conditions Arkadiusz Miskiewicz
2008-12-15 19:29 ` [PATCH 5/6] xfs_quota: Add missing options to --help Arkadiusz Miskiewicz
2008-12-15 19:29 ` [PATCH 6/6] xfs_quota: Fix range for -U Arkadiusz Miskiewicz
2008-12-16 4:03 ` Eric Sandeen [this message]
2008-12-16 3:55 ` [PATCH 5/6] xfs_quota: Add missing options to --help Eric Sandeen
2008-12-16 4:46 ` [PATCH 4/6] xfs_quota: Return non zero exit status in error conditions Eric Sandeen
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=49472895.2050601@sandeen.net \
--to=sandeen@sandeen.net \
--cc=arekm@maven.pl \
--cc=linux-xfs@oss.sgi.com \
--cc=nscott@aconex.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.