Module Name:    src
Committed By:   ryo
Date:           Sun Apr  2 18:11:26 UTC 2023

Modified Files:
        src/sbin/sysctl: sysctl.c

Log Message:
don't pass add=1 to print_tree() when displaying by specifying nodes.

For example, "sysctl -w kern.mbuf=" had been displayed extra node names in the 
MIB.
 # sysctl -w kern.mbuf=
 kern.mbuf.mbuf.msize = 512
 kern.mbuf.mbuf.mclbytes = 2048
 :


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 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.163 src/sbin/sysctl/sysctl.c:1.164
--- src/sbin/sysctl/sysctl.c:1.163	Tue Dec 28 16:06:57 2021
+++ src/sbin/sysctl/sysctl.c	Sun Apr  2 18:11:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.c,v 1.163 2021/12/28 16:06:57 christos Exp $ */
+/*	$NetBSD: sysctl.c,v 1.164 2023/04/02 18:11:26 ryo 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.163 2021/12/28 16:06:57 christos Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.164 2023/04/02 18:11:26 ryo Exp $");
 #endif
 #endif /* not lint */
 
@@ -944,7 +944,7 @@ parse(char *l, regex_t *re, size_t *last
 		/*
 		 * XXX old behavior is to print.  should we error instead?
 		 */
-		print_tree(&name[0], namelen, node, CTLTYPE_NODE, 1, re,
+		print_tree(&name[0], namelen, node, CTLTYPE_NODE, 0, re,
 		    lastcompiled);
 		break;
 	case CTLTYPE_INT:

Reply via email to