summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-05-17 22:28:46 +0000
committerjhb <jhb@FreeBSD.org>2001-05-17 22:28:46 +0000
commit59ffccfbd6932c90e77e70ea73d3b8afea0998ba (patch)
tree892434b71a21c137edd1153dd459ca1508ddd96f
parentc246122199c212c96b68d551436aa739669eddee (diff)
downloadFreeBSD-src-59ffccfbd6932c90e77e70ea73d3b8afea0998ba.zip
FreeBSD-src-59ffccfbd6932c90e77e70ea73d3b8afea0998ba.tar.gz
- Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT.
- Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
-rw-r--r--sys/alpha/alpha/machdep.c6
-rw-r--r--sys/amd64/amd64/machdep.c6
-rw-r--r--sys/i386/i386/machdep.c6
-rw-r--r--sys/ia64/ia64/machdep.c4
-rw-r--r--sys/kern/init_main.c12
5 files changed, 15 insertions, 19 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index 60e9c86..54e706b 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -186,7 +186,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
struct msgbuf *msgbufp=0;
-int bootverbose = 0, Maxmem = 0;
+int Maxmem = 0;
long dumplo;
int totalphysmem; /* total amount of physical memory in system */
@@ -254,13 +254,9 @@ cpu_startup(dummy)
vm_offset_t firstaddr;
vm_offset_t minaddr;
- if (boothowto & RB_VERBOSE)
- bootverbose++;
-
/*
* Good {morning,afternoon,evening,night}.
*/
- printf("%s", version);
identifycpu();
/* startrtclock(); */
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 509dcfd..bb552a3 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -230,7 +230,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
"Clear kernel message buffer");
-int bootverbose = 0, Maxmem = 0;
+int Maxmem = 0;
long dumplo;
vm_offset_t phys_avail[10];
@@ -261,13 +261,9 @@ cpu_startup(dummy)
vm_offset_t minaddr;
int physmem_est;
- if (boothowto & RB_VERBOSE)
- bootverbose++;
-
/*
* Good {morning,afternoon,evening,night}.
*/
- printf("%s", version);
earlysetcpuclass();
startrtclock();
printcpuinfo();
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 509dcfd..bb552a3 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -230,7 +230,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
"Clear kernel message buffer");
-int bootverbose = 0, Maxmem = 0;
+int Maxmem = 0;
long dumplo;
vm_offset_t phys_avail[10];
@@ -261,13 +261,9 @@ cpu_startup(dummy)
vm_offset_t minaddr;
int physmem_est;
- if (boothowto & RB_VERBOSE)
- bootverbose++;
-
/*
* Good {morning,afternoon,evening,night}.
*/
- printf("%s", version);
earlysetcpuclass();
startrtclock();
printcpuinfo();
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 566a7e5..e2223a8 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -174,13 +174,9 @@ cpu_startup(dummy)
vm_offset_t firstaddr;
vm_offset_t minaddr;
- if (boothowto & RB_VERBOSE)
- bootverbose++;
-
/*
* Good {morning,afternoon,evening,night}.
*/
- printf("%s", version);
identifycpu();
/* startrtclock(); */
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index a27b3e3..f1a6a0b 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -99,6 +99,8 @@ extern int fallback_elf_brand;
struct vnode *rootvp;
int boothowto = 0; /* initialized so that it can be patched */
SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
+int bootverbose;
+SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "");
/*
* This ensures that there is at least one entry so that the sysinit_set
@@ -239,6 +241,16 @@ print_caddr_t(void *data __unused)
printf("%s", (char *)data);
}
SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright)
+SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, version)
+
+static void
+set_boot_verbose(void *data __unused)
+{
+
+ if (boothowto & RB_VERBOSE)
+ bootverbose++;
+}
+SYSINIT(boot_verbose, SI_SUB_TUNABLES, SI_ORDER_ANY, set_boot_verbose, NULL)
/*
***************************************************************************
OpenPOWER on IntegriCloud