summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-04-28 18:01:19 +0000
committerderaadt <deraadt@openbsd.org>1999-04-28 18:01:19 +0000
commit75136bc3f7f7992c23040f3f282d0223545a316c (patch)
treeb6336b81e5f8f9c1bbc98b3d2916ee346b3641ca
parentcheck correct arg; garath@ntplx.net (diff)
downloadwireguard-openbsd-75136bc3f7f7992c23040f3f282d0223545a316c.tar.xz
wireguard-openbsd-75136bc3f7f7992c23040f3f282d0223545a316c.zip
add autoconfig_verbose toggling command to boot_config
-rw-r--r--share/man/man8/boot_config.84
-rw-r--r--sys/kern/subr_userconf.c13
-rw-r--r--sys/sys/device.h4
3 files changed, 17 insertions, 4 deletions
diff --git a/share/man/man8/boot_config.8 b/share/man/man8/boot_config.8
index 4694cfb2bc3..4d143c56c7a 100644
--- a/share/man/man8/boot_config.8
+++ b/share/man/man8/boot_config.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot_config.8,v 1.6 1998/12/13 22:39:58 millert Exp $
+.\" $OpenBSD: boot_config.8,v 1.7 1999/04/28 18:01:19 deraadt Exp $
.\"
.\" Copyright (c) 1996 Mats O Jansson
.\" All rights reserved.
@@ -86,6 +86,8 @@ Show all devices for which attribute
.Ar attr
has the value
.Ar val .
+.It Ic verbose
+Toggle the autoconfig verbose variable.
.El
.Pp
.Sh EXAMPLES
diff --git a/sys/kern/subr_userconf.c b/sys/kern/subr_userconf.c
index 83bd9163a03..a3eac1088cc 100644
--- a/sys/kern/subr_userconf.c
+++ b/sys/kern/subr_userconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_userconf.c,v 1.15 1998/03/03 05:43:03 deraadt Exp $ */
+/* $OpenBSD: subr_userconf.c,v 1.16 1999/04/28 18:01:22 deraadt Exp $ */
/*
* Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@@ -98,6 +98,7 @@ char *userconf_cmds[] = {
"lines", "L",
"quit", "q",
"show", "s",
+ "verbose", "v",
"?", "h",
"", "",
};
@@ -537,7 +538,7 @@ userconf_help()
printf("command args description\n");
while (*userconf_cmds[j] != '\0') {
printf(userconf_cmds[j]);
- k=strlen(userconf_cmds[j]);
+ k = strlen(userconf_cmds[j]);
while (k < 10) {
printf(" ");
k++;
@@ -577,6 +578,9 @@ userconf_help()
printf("[attr [val]] %s",
"show attributes (or devices with an attribute)");
break;
+ case 'v':
+ printf(" toggle verbose booting");
+ break;
default:
printf(" don't know");
break;
@@ -1101,6 +1105,11 @@ userconf_parse(cmd)
else
userconf_show_attr(c);
break;
+ case 'v':
+ autoconf_verbose = !autoconf_verbose;
+ printf("autoconf verbose %sabled\n",
+ autoconf_verbose ? "en" : "dis");
+ break;
default:
printf("Unknown command\n");
break;
diff --git a/sys/sys/device.h b/sys/sys/device.h
index 79e9bde2bb7..017a585611c 100644
--- a/sys/sys/device.h
+++ b/sys/sys/device.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: device.h,v 1.13 1998/05/11 09:59:37 niklas Exp $ */
+/* $OpenBSD: device.h,v 1.14 1999/04/28 18:01:22 deraadt Exp $ */
/* $NetBSD: device.h,v 1.15 1996/04/09 20:55:24 cgd Exp $ */
/*
@@ -168,6 +168,8 @@ TAILQ_HEAD(cftable_head, cftable);
extern struct devicelist alldevs; /* list of all devices */
extern struct evcntlist allevents; /* list of all event counters */
+extern int autoconf_verbose;
+
void config_init __P((void));
void config_edit __P((void));
void *config_search __P((cfmatch_t, struct device *, void *));