diff options
| author | John Levon <john.levon@joyent.com> | 2019-08-20 20:44:44 +0000 |
|---|---|---|
| committer | John Levon <john.levon@joyent.com> | 2019-08-21 07:35:56 +0000 |
| commit | f0a2865453f053f6ff0041c6326877f1149d89ec (patch) | |
| tree | 6ceb3fff46dd567be415a839ae9b74ee2c27b5f3 /usr/src/cmd | |
| parent | 0678e39e27ea5dfce7fc85dcc38c837f3c8f6f6d (diff) | |
| download | illumos-joyent-f0a2865453f053f6ff0041c6326877f1149d89ec.tar.gz | |
OS-7922 buildstamp module should live in illumos-joyent
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd')
| -rw-r--r-- | usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/mdb/common/mdb/mdb_ks.h | 4 | ||||
| -rw-r--r-- | usr/src/cmd/mdb/common/mdb/mdb_kvm.c | 12 | ||||
| -rw-r--r-- | usr/src/cmd/mdb/common/modules/mdb_ks/mdb_ks.c | 13 | ||||
| -rw-r--r-- | usr/src/cmd/nsadmin/system | 6 |
5 files changed, 20 insertions, 19 deletions
diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c b/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c index 787dc7cfd8..d14ce2fbed 100644 --- a/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c @@ -22,7 +22,7 @@ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ #include <kmdb/kmdb_kvm.h> @@ -571,7 +571,7 @@ kmt_status_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) mdb_printf("operating system: %s %s (%s)\n", uts.release, uts.version, uts.machine); - mdb_print_gitstatus(); + mdb_print_buildversion(); if (mdb_readsym(uuid, sizeof (uuid), "dump_osimage_uuid") == sizeof (uuid) && diff --git a/usr/src/cmd/mdb/common/mdb/mdb_ks.h b/usr/src/cmd/mdb/common/mdb/mdb_ks.h index 0717e2acce..0ac58d26f5 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_ks.h +++ b/usr/src/cmd/mdb/common/mdb/mdb_ks.h @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ #ifndef _MDB_KS_H @@ -144,7 +144,7 @@ extern const char *mdb_dlpi_prim(int); /* Generic function for working with MAC (network layer 2) addresses. */ extern void mdb_mac_addr(const uint8_t *, size_t, char *, size_t); -extern void mdb_print_gitstatus(void); +extern void mdb_print_buildversion(void); /* * Target-specific interfaces diff --git a/usr/src/cmd/mdb/common/mdb/mdb_kvm.c b/usr/src/cmd/mdb/common/mdb/mdb_kvm.c index 2646e49d6c..2a446d6fc9 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_kvm.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_kvm.c @@ -23,7 +23,7 @@ */ /* - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -96,7 +96,7 @@ typedef struct kt_maparg { static const char KT_MODULE[] = "mdb_ks"; static const char KT_CTFPARENT[] = "genunix"; -static void (*print_gitstatus)(void); +static void (*print_buildversion)(void); static void kt_load_module(kt_data_t *kt, mdb_tgt_t *t, kt_module_t *km) @@ -489,8 +489,8 @@ kt_status_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) mdb_printf("operating system: %s %s (%s)\n", uts.release, uts.version, uts.machine); - if (print_gitstatus != NULL) - print_gitstatus(); + if (print_buildversion != NULL) + print_buildversion(); if (kt->k_dumphdr) { dumphdr_t *dh = kt->k_dumphdr; @@ -591,8 +591,8 @@ kt_activate(mdb_tgt_t *t) "some modules may not load\n"); } - print_gitstatus = (void (*)(void))dlsym(RTLD_NEXT, - "mdb_print_gitstatus"); + print_buildversion = (void (*)(void))dlsym(RTLD_NEXT, + "mdb_print_buildversion"); if (mdb_prop_postmortem && kt->k_dumphdr != NULL) { sym = dlsym(RTLD_NEXT, "mdb_dump_print_content"); diff --git a/usr/src/cmd/mdb/common/modules/mdb_ks/mdb_ks.c b/usr/src/cmd/mdb/common/modules/mdb_ks/mdb_ks.c index cdbfd3d755..944d9b13b2 100644 --- a/usr/src/cmd/mdb/common/modules/mdb_ks/mdb_ks.c +++ b/usr/src/cmd/mdb/common/modules/mdb_ks/mdb_ks.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -1823,16 +1823,19 @@ mdb_get_lbolt(void) * Dig out the branch and revision of the illumos-joyent repo, if we were * provided with it. This is a rather fragile JSON parser, in that it requires * JSON formatted exactly as per the boot_archive.gitstatus file that - * "gitstatus_start" is built from. + * "buildversion_start" is built from. */ void -mdb_print_gitstatus(void) +mdb_print_buildversion(void) { boolean_t in_joyent = B_FALSE; GElf_Sym sym; - if (mdb_lookup_by_name("gitstatus_start", &sym) != 0) - return; + if (mdb_lookup_by_name("buildversion_start", &sym) != 0) { + /* Older kernels used this name. */ + if (mdb_lookup_by_name("gitstatus_start", &sym) != 0) + return; + } char *str = mdb_zalloc(4096, UM_SLEEP | UM_GC); diff --git a/usr/src/cmd/nsadmin/system b/usr/src/cmd/nsadmin/system index 905594de8a..1143a7b7ec 100644 --- a/usr/src/cmd/nsadmin/system +++ b/usr/src/cmd/nsadmin/system @@ -171,8 +171,6 @@ set sd:sd_io_time=10 set hires_tick=1 * -* The "buildstamp" module contains information about the git sources used to -* build the operating system image. Once loaded, the driver will refuse to -* detach. We load it early to ensure it is in a crash dump wherever possible. +* See usr/src/uts/common/os/buildversion.c * -forceload: drv/buildstamp +forceload: misc/buildversion |
