X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_81 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mBMGi2TN006474 for ; Mon, 22 Dec 2008 10:44:02 -0600 X-ASG-Debug-ID: 1229964240-51d400fc0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E5A5B3F8D5 for ; Mon, 22 Dec 2008 08:44:00 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 3jAFvM0bZ1pMzJtC for ; Mon, 22 Dec 2008 08:44:00 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1LEnsu-0005mg-7E; Mon, 22 Dec 2008 16:44:00 +0000 Message-Id: <20081222164400.139744000@bombadil.infradead.org> References: <20081222163831.755809000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Mon, 22 Dec 2008 11:38:40 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com Cc: Arkadiusz Miskiewicz X-ASG-Orig-Subj: [PATCH 09/20] xfs_quota: Fix range for -U. Subject: [PATCH 09/20] xfs_quota: Fix range for -U. Content-Disposition: inline; filename=xfsprogs-quota-range-fix X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1229964240 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com From: Arkadiusz Miskiewicz 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. Reviewed-by: Christoph Hellwig --- 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)) -- 1.6.0.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs --