diff options
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | quotacheck.c | 15 |
2 files changed, 12 insertions, 6 deletions
@@ -1,6 +1,7 @@ Changes in quota-tools from 3.02 to 3.03 -* +* quotacheck now skips quota file scanning when file not found (Jan Kara) +* repquota shouldn't show grace times when softlimit is not exceeded (Jan Kara) * removed bogus error message in mountpoint scanning (Jan Kara) * fixed mountpoint scanning initialization (solved rpc.rquotad SEGFAULT) (Jan Kara) * rpc.rquotad now doesn't need mountpoint for quota operations (Jan Kara) diff --git a/quotacheck.c b/quotacheck.c index 1abfde4..8a3615f 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.25 2001/12/05 14:14:46 jkar8572 Exp $" +#ident "$Id: quotacheck.c,v 1.26 2001/12/14 07:50:48 jkar8572 Exp $" #include <dirent.h> #include <stdio.h> @@ -575,10 +575,16 @@ Please turn quotas off or use -f to force checking.\n"), return -1; } if ((fd = open(qfname, O_RDONLY)) < 0) { - errstr(_("Cannot open quotafile %s: %s\n"), - qfname, strerror(errno)); + if (errno != ENOENT) { + errstr(_("Cannot open quotafile %s: %s\n"), + qfname, strerror(errno)); + free(qfname); + return -1; + } + /* When file was not found, just skip it */ + flags |= FL_NEWFILE; free(qfname); - return -1; + qfname = NULL; } } @@ -821,7 +827,6 @@ static int detect_filename_format(struct mntent *mnt, int type) if (!stat(namebuf, &statbuf)) return QF_VFSOLD; /* Old quota files don't exist, just create newest quotafile available */ - flags |= FL_NEWFILE; return QF_VFSV0; } |