Print this page
11626 introduce /etc/versions/build
11627 clean up UUID code for ::status
*** 18,28 ****
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright 2017 Joyent, Inc.
*/
/*
* Mdb kernel support module. This module is loaded automatically when the
* kvm target is initialized. Any global functions declared here are exported
--- 18,28 ----
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright 2019 Joyent, Inc.
*/
/*
* Mdb kernel support module. This module is loaded automatically when the
* kvm target is initialized. Any global functions declared here are exported
*** 1807,1812 ****
--- 1807,1828 ----
mdb_warn("failed to read 'nsec_per_tick'");
return (-1);
}
return ((ts/nsec) - lbi.lbi_debug_time);
+ }
+
+ void
+ mdb_print_buildversion(void)
+ {
+ GElf_Sym sym;
+
+ if (mdb_lookup_by_name("buildversion", &sym) != 0)
+ return;
+
+ char *str = mdb_zalloc(4096, UM_SLEEP | UM_GC);
+
+ if (mdb_readstr(str, 4096, sym.st_value) < 1)
+ return;
+
+ mdb_printf("build version: %s\n", str);
}