aboutsummaryrefslogtreecommitdiff
path: root/sbin/sysctl/sysctl.c
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2003-11-01 07:06:04 +0000
committerMike Silbersack <silby@FreeBSD.org>2003-11-01 07:06:04 +0000
commitac8711d28e3377b5e06a31d2c02efa4d563adacd (patch)
tree17840f83a64f47b7083c9d8df54f1cebedbae3ec /sbin/sysctl/sysctl.c
parentdf3ccb96d8c04d9bd0034625f4ebc0cb6c5f0483 (diff)
downloadsrc-ac8711d28e3377b5e06a31d2c02efa4d563adacd.tar.gz
src-ac8711d28e3377b5e06a31d2c02efa4d563adacd.zip
Fix a few style glitches in the previous commit and make the
tunable error message more brief. Suggested by: bde
Notes
Notes: svn path=/head/; revision=121849
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r--sbin/sysctl/sysctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index a92f0f989e11..e373b6492f8a 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -196,13 +196,13 @@ parse(char *string)
if ((kind & CTLTYPE) == CTLTYPE_NODE)
errx(1, "oid '%s' isn't a leaf node", bufp);
- if (!(kind&CTLFLAG_WR))
+ if (!(kind & CTLFLAG_WR)) {
if (kind & CTLFLAG_TUN) {
- fprintf(stderr, "Tunable values are set in"
- " /boot/loader.conf and require a reboot to take effect.\n");
- errx(1, "oid '%s' is a tunable.", bufp);
+ warnx("oid '%s' is a read only tunable", bufp);
+ errx(1, "Tunable values are set in /boot/loader.conf");
} else {
errx(1, "oid '%s' is read only", bufp);
+ }
}
if ((kind & CTLTYPE) == CTLTYPE_INT ||
@@ -215,7 +215,7 @@ parse(char *string)
switch (kind & CTLTYPE) {
case CTLTYPE_INT:
- intval = (int) strtol(newval, &endptr, 0);
+ intval = (int)strtol(newval, &endptr, 0);
if (endptr == newval || *endptr != '\0')
errx(1, "invalid integer '%s'",
newval);