Module Name: src Committed By: christos Date: Sun Feb 12 20:54:08 UTC 2012
Modified Files: src/sbin/sysctl: sysctl.c Log Message: Only print errors when -A or required. Fix the error message to match others. To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/sbin/sysctl/sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.139 src/sbin/sysctl/sysctl.c:1.140 --- src/sbin/sysctl/sysctl.c:1.139 Wed Jan 4 11:09:42 2012 +++ src/sbin/sysctl/sysctl.c Sun Feb 12 15:54:07 2012 @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #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 @@ sysctlerror(int soft) } } - sysctlperror("%s: sysctl() failed with %s\n", - gsname, strerror(errno)); + if (Aflag || req) + sysctlperror("%s: %s\n", gsname, strerror(errno)); if (!soft) EXIT(1); }