summaryrefslogtreecommitdiffstats
path: root/sbin/sysctl/sysctl.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-12-01 15:01:23 +0000
committerjhb <jhb@FreeBSD.org>2011-12-01 15:01:23 +0000
commit34790eafe042b2eeedd8503778544f84c30aa2e4 (patch)
treebf241f251695fdc2e4ea090878c793486690b660 /sbin/sysctl/sysctl.c
parent132ad7aa9b624e01c572592aeb815bac0f8a5940 (diff)
downloadFreeBSD-src-34790eafe042b2eeedd8503778544f84c30aa2e4.zip
FreeBSD-src-34790eafe042b2eeedd8503778544f84c30aa2e4.tar.gz
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
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r--sbin/sysctl/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 608e1d9..738117f 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);
OpenPOWER on IntegriCloud