summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
committerJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
commit5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch)
tree7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/uts/common/os
parent8ca018083101bf1cb175869679bc123187fb1bab (diff)
parent2a1277d3064386cd5c4e372301007aa330bf1d5e (diff)
downloadillumos-joyent-gcc9.tar.gz
mergegcc9
Diffstat (limited to 'usr/src/uts/common/os')
-rw-r--r--usr/src/uts/common/os/logsubr.c16
-rw-r--r--usr/src/uts/common/os/strsubr.c1
2 files changed, 16 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/logsubr.c b/usr/src/uts/common/os/logsubr.c
index 9e58a7bb56..2543bdf17e 100644
--- a/usr/src/uts/common/os/logsubr.c
+++ b/usr/src/uts/common/os/logsubr.c
@@ -20,6 +20,7 @@
*/
/*
+ * Copyright 2020 Oxide Computer Company
* Copyright (c) 2013 Gary Mills
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2020 Joyent, Inc.
@@ -43,6 +44,7 @@
#include <sys/utsname.h>
#include <sys/id_space.h>
#include <sys/zone.h>
+#include <sys/bootbanner.h>
log_zone_t log_global;
queue_t *log_consq;
@@ -182,6 +184,14 @@ log_zonefree(zoneid_t zoneid, void *arg)
kmem_free(lzp, sizeof (log_zone_t));
}
+static void
+log_bootbanner_print(const char *line, uint_t num)
+{
+ const char *pfx = (num == 0) ? "\r" : "";
+
+ printf("%s%s\n", pfx, line);
+}
+
void
log_init(void)
{
@@ -246,11 +256,15 @@ log_init(void)
log_update(&log_backlog, log_backlogq, SL_CONSOLE, log_console);
/*
- * Now that logging is enabled, emit the SunOS banner.
+ * Now that logging is enabled, emit the boot banner.
*/
+#ifdef LEGACY_BANNER
printf("\rSunOS Release %s Version %s %u-bit\n",
utsname.release, utsname.version, NBBY * (uint_t)sizeof (void *));
printf("Copyright 2010-2020 Joyent, Inc.\n");
+#else
+ bootbanner_print(log_bootbanner_print, KM_SLEEP);
+#endif
#ifdef DEBUG
printf("DEBUG enabled\n");
#endif
diff --git a/usr/src/uts/common/os/strsubr.c b/usr/src/uts/common/os/strsubr.c
index ac1ee2d1ce..1e18a0ce9e 100644
--- a/usr/src/uts/common/os/strsubr.c
+++ b/usr/src/uts/common/os/strsubr.c
@@ -28,6 +28,7 @@
* Copyright (c) 2016 by Delphix. All rights reserved.
* Copyright 2018 Joyent, Inc.
* Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2018 Joyent, Inc.
*/
#include <sys/types.h>