summaryrefslogtreecommitdiff
path: root/quotaon.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-04-11 10:12:36 +0000
committerjkar8572 <jkar8572>2001-04-11 10:12:36 +0000
commitbc47c58ac28bea3666ae128f9493f58195baee64 (patch)
tree73bf190dfc0daa5a7a6d8dadabc6b8b337396ade /quotaon.c
parent7ec003b82d056fa150924f15da0d0d0e353cf041 (diff)
downloadlinuxquota-bc47c58ac28bea3666ae128f9493f58195baee64.tar.gz
Updated manpages.
Fixed small bug in repquota (User vs Group). Some XFS updates. Fixed problems with devfs and relative paths.
Diffstat (limited to 'quotaon.c')
-rw-r--r--quotaon.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/quotaon.c b/quotaon.c
index 6e8d17b..12cce13 100644
--- a/quotaon.c
+++ b/quotaon.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: quotaon.c,v 1.1 2001/03/23 12:03:27 jkar8572 Exp $"
+#ident "$Id: quotaon.c,v 1.2 2001/04/11 10:12:36 jkar8572 Exp $"
/*
* Turn quota on/off for a filesystem.
@@ -62,12 +62,12 @@ static void usage(char *whoami)
/*
* Check to see if target appears in list of size cnt.
*/
-static int oneof(char *target, char *list[], int cnt)
+static int oneof(char *dir, char *dev, char *list[], int cnt)
{
int i;
for (i = 0; i < cnt; i++)
- if (strcmp(target, list[i]) == 0)
+ if (devcmp(dev, list[i]) || dircmp(dir, list[i]))
return (i);
return (-1);
}
@@ -169,8 +169,7 @@ int main(int argc, char **argv)
continue;
}
else {
- if ((argnum = oneof(mnt->mnt_dir, argv, argc)) >= 0 ||
- (argnum = oneof(mnt->mnt_fsname, argv, argc)) >= 0)
+ if ((argnum = oneof(mnt->mnt_dir, mnt->mnt_fsname, argv, argc)) >= 0)
done |= 1 << argnum;
else
continue;