summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-04-12 05:56:53 +0000
committerjkar8572 <jkar8572>2001-04-12 05:56:53 +0000
commit4f7c6f32133cf2e880ed06db3b8d476e655d0b0a (patch)
tree326306817361e95603ba1b87be6546712a229156
parentbc47c58ac28bea3666ae128f9493f58195baee64 (diff)
downloadlinuxquota-4f7c6f32133cf2e880ed06db3b8d476e655d0b0a.tar.gz
Fixed bug with deice inodes in quotacheck.
Fixed bug with devcmp() in quotaops.
-rw-r--r--quotacheck.c4
-rw-r--r--quotaops.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/quotacheck.c b/quotacheck.c
index 3377298..b6e3cd8 100644
--- a/quotacheck.c
+++ b/quotacheck.c
@@ -8,7 +8,7 @@
* New quota format implementation - Jan Kara <jack@suse.cz> - Sponsored by SuSE CR
*/
-#ident "$Id: quotacheck.c,v 1.4 2001/04/11 10:12:36 jkar8572 Exp $"
+#ident "$Id: quotacheck.c,v 1.5 2001/04/12 05:56:53 jkar8572 Exp $"
#include <dirent.h>
#include <stdio.h>
@@ -241,6 +241,8 @@ static loff_t getqsize(char *fname, struct stat *st)
if (S_ISLNK(st->st_mode)) /* There's no way to do ioctl() on links... */
return st->st_blocks << 9;
+ if (!S_ISDIR(st->st_mode) && !S_ISREG(st->st_mode))
+ return st->st_blocks << 9;
if ((fd = open(fname, O_RDONLY)) == -1)
die(2, _("Cannot open file %s: %s\n"), fname, strerror(errno));
if (ioctl(fd, FIOQSIZE, &size) == -1) {
diff --git a/quotaops.c b/quotaops.c
index fed0168..15bd2a8 100644
--- a/quotaops.c
+++ b/quotaops.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: quotaops.c,v 1.2 2001/04/11 10:12:36 jkar8572 Exp $"
+#ident "$Id: quotaops.c,v 1.3 2001/04/12 05:56:53 jkar8572 Exp $"
#include <rpc/rpc.h>
#include <sys/types.h>
@@ -208,7 +208,7 @@ static void merge_to_list(struct dquot *qlist, char *dev, u_int64_t blocks, u_in
struct dquot *q;
for (q = qlist; q; q = q->dq_next) {
- if (devcmp_handle(dev, q->dq_h))
+ if (!devcmp_handle(dev, q->dq_h))
continue;
/*