Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/sysctl Only print errors when -A or required. Fix the e...
details: https://anonhg.NetBSD.org/src/rev/61aca15f57b9
branches: trunk
changeset: 773676:61aca15f57b9
user: christos <christos%NetBSD.org@localhost>
date: Sun Feb 12 20:54:07 2012 +0000
description:
Only print errors when -A or required. Fix the error message to match others.
diffstat:
sbin/sysctl/sysctl.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r b1c9498e783f -r 61aca15f57b9 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c Sun Feb 12 20:28:14 2012 +0000
+++ b/sbin/sysctl/sysctl.c Sun Feb 12 20:54:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.139 2012/01/04 16:09:42 drochner Exp $ */
+/* $NetBSD: sysctl.c,v 1.140 2012/02/12 20:54:07 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.139 2012/01/04 16:09:42 drochner Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.140 2012/02/12 20:54:07 christos Exp $");
#endif
#endif /* not lint */
@@ -1688,8 +1688,8 @@
}
}
- sysctlperror("%s: sysctl() failed with %s\n",
- gsname, strerror(errno));
+ if (Aflag || req)
+ sysctlperror("%s: %s\n", gsname, strerror(errno));
if (!soft)
EXIT(1);
}
Home |
Main Index |
Thread Index |
Old Index