From 0b6230f135e8db3d35c6009ffaa6ed71b2437fa7 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Dec 2011 15:01:23 +0000 Subject: [PATCH] If the -d flag is specified, ignore any new values specified and only display the descriptions of specified nodes. Reported by: Jason Hellenthal jhell of dataix net MFC after: 2 weeks --- sbin/sysctl/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 608e1d938ee..738117ffb4a 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -201,7 +201,7 @@ parse(char *string) if (oidfmt(mib, len, fmt, &kind)) err(1, "couldn't find format of oid '%s'", bufp); - if (newval == NULL) { + if (newval == NULL || dflag) { if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { i = show_var(mib, len);