xfs
[Top] [All Lists]

[PATCH] Fix xfs_quota path command.

To: xfs@xxxxxxxxxxx
Subject: [PATCH] Fix xfs_quota path command.
From: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Date: Wed, 09 May 2007 14:59:11 +0900
Sender: xfs-bounce@xxxxxxxxxxx
Hi,

In path command in xfs_quota, the range value in the message becomes
from 0 to -1 incorrectly when the list number is specified though the path list
is empty. I think that the message is unnecessary the same as not specifying
the list number in this case.

Example:
# ./xfs_quota -x
xfs_quota> path
xfs_quota> path 0
value 0 is out of range (0--1)

Signed-off-by: Utako Kusaka <utako@xxxxxxxxxxxxxx>
---
 
--- xfsprogs-2.8.20/quota/path.orig     2007-04-26 14:14:00.000000000 +0900
+++ xfsprogs-2.8.20/quota/path.c        2007-04-27 11:27:56.000000000 +0900
@@ -102,6 +102,9 @@ path_f(
        if (argc <= 1)
                return pathlist_f();
 
+       if (!fs_count)
+               return 0;
+
        i = atoi(argv[1]);
        if (i < 0 || i >= fs_count) {
                printf(_("value %d is out of range (0-%d)\n"),


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Fix xfs_quota path command., Utako Kusaka <=