Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libquota Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/c7afd9916a60
branches: netbsd-6
changeset: 773858:c7afd9916a60
user: riz <riz%NetBSD.org@localhost>
date: Fri Mar 02 16:45:29 2012 +0000
description:
Pull up following revision(s) (requested by njoly in ticket #67):
lib/libquota/quota_oldfiles.c: revision 1.9
Check if fstab file exists before trying to parse it, to avoid
warnings from {get,set}fsent() functions if missing.
dholland ok.
diffstat:
lib/libquota/quota_oldfiles.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r f4728b705aa8 -r c7afd9916a60 lib/libquota/quota_oldfiles.c
--- a/lib/libquota/quota_oldfiles.c Fri Mar 02 16:42:22 2012 +0000
+++ b/lib/libquota/quota_oldfiles.c Fri Mar 02 16:45:29 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $ */
+/* $NetBSD: quota_oldfiles.c,v 1.8.2.1 2012/03/02 16:45:29 riz Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $");
+__RCSID("$NetBSD: quota_oldfiles.c,v 1.8.2.1 2012/03/02 16:45:29 riz Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -205,6 +205,13 @@
}
/*
+ * Check if fstab file exists before trying to parse it.
+ * Avoid warnings from {get,set}fsent() if missing.
+ */
+ if (access(_PATH_FSTAB, F_OK) == -1 && errno == ENOENT)
+ return;
+
+ /*
* XXX: should be able to handle ext2fs quota1 files too
*
* XXX: should use getfsent_r(), but there isn't one.
Home |
Main Index |
Thread Index |
Old Index