summaryrefslogtreecommitdiff
path: root/quotacheck.c
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 /quotacheck.c
parentbc47c58ac28bea3666ae128f9493f58195baee64 (diff)
Fixed bug with deice inodes in quotacheck.
Fixed bug with devcmp() in quotaops.
Diffstat (limited to 'quotacheck.c')
-rw-r--r--quotacheck.c4
1 files changed, 3 insertions, 1 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) {