--- ./sysctl.c.sysctl 2004-07-15 17:32:42.000000000 +0200 +++ ./sysctl.c 2004-08-12 17:49:08.894600421 +0200 @@ -38,6 +38,7 @@ typedef int bool; static bool true = 1; static bool false = 0; +static int verbose; /* * Globals... @@ -332,9 +333,10 @@ if (NameOnly) { fprintf(stdout, "%s\n", outname); } else { - if (PrintName) { + if (PrintName && verbose) { fprintf(stdout, "%s = %s\n", outname, value); } else { + if (verbose) if (PrintNewline) fprintf(stdout, "%s\n", value); else @@ -464,6 +466,9 @@ SwitchesAllowed = false; WriteMode = true; break; + case 'v': + verbose++; + break; case 'f': // the NetBSD way case 'p': argv++; --- ./sysctl.8.sysctl 2004-07-30 03:42:03.000000000 +0200 +++ ./sysctl.8 2004-08-12 17:50:42.203511780 +0200 @@ -10,15 +10,15 @@ .SH NAME sysctl \- configure kernel parameters at runtime .SH SYNOPSIS -.B "sysctl [-n] [-e] variable ..." +.B "sysctl [-v] [-e] variable ..." .br -.B "sysctl [-n] [-e] [-q] -w variable=value ..." +.B "sysctl [-v] [-e] [-q] -w variable=value ..." .br -.B "sysctl [-n] [-e] [-q] -p <filename>" +.B "sysctl [-v] [-e] [-q] -p <filename>" .br -.B "sysctl [-n] [-e] -a" +.B "sysctl [-v] [-e] -a" .br -.B "sysctl [-n] [-e] -A" +.B "sysctl [-v] [-e] -A" .SH DESCRIPTION .B sysctl is used to modify kernel parameters at runtime. The parameters available @@ -39,8 +39,9 @@ which are parsed by the shell, you may need to enclose the value in double quotes. This requires the -w parameter to use. .TP -.B "-n" -Use this option to disable printing of the key name when printing values. +.B "-v" +Use this option to enable printing of the key name when printing +values (by default nothing is printed). .TP .B "-e" Use this option to ignore errors about unknown keys.