summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-07-15 00:35:11 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-07-15 00:35:11 +0000
commit3e2357525e6b3441d5d202b02f3dbfceef78670d (patch)
tree00961dca2fde8d4a2c395d67960dd76573d93898 /sys/arch/amd64
parent5a45b5b2ae78fef2a41ab957e5da6b1d33046f41 (diff)
store smbios date string in globally visible var for drm
ok mlarkin@ kettenis@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/bios.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/bios.c b/sys/arch/amd64/amd64/bios.c
index e4076a9c678..1e395891d6b 100644
--- a/sys/arch/amd64/amd64/bios.c
+++ b/sys/arch/amd64/amd64/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.37 2018/10/23 17:51:32 kettenis Exp $ */
+/* $OpenBSD: bios.c,v 1.38 2019/07/15 00:35:10 jsg Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
*
@@ -67,6 +67,8 @@ const char *smbios_uninfo[] = {
"SYS-"
};
+char smbios_bios_date[64];
+
int
bios_match(struct device *parent, void *match , void *aux)
{
@@ -141,8 +143,11 @@ bios_attach(struct device *parent, struct device *self, void *aux)
printf(" version \"%s\"",
fixstring(scratch));
if ((smbios_get_string(&bios, sb->release,
- scratch, sizeof(scratch))) != NULL)
+ scratch, sizeof(scratch))) != NULL) {
+ strlcpy(smbios_bios_date, fixstring(scratch),
+ sizeof(smbios_bios_date));
printf(" date %s", fixstring(scratch));
+ }
}
smbios_info(sc->sc_dev.dv_xname);