From 3e2357525e6b3441d5d202b02f3dbfceef78670d Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 15 Jul 2019 00:35:11 +0000 Subject: store smbios date string in globally visible var for drm ok mlarkin@ kettenis@ --- sys/arch/i386/i386/bios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c index 9a622769c3b..f9f05cf89a5 100644 --- a/sys/arch/i386/i386/bios.c +++ b/sys/arch/i386/i386/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.120 2018/10/23 17:51:32 kettenis Exp $ */ +/* $OpenBSD: bios.c,v 1.121 2019/07/15 00:35:10 jsg Exp $ */ /* * Copyright (c) 1997-2001 Michael Shalayeff @@ -140,6 +140,8 @@ const char *smbios_uninfo[] = { }; +char smbios_bios_date[64]; + int biosprobe(struct device *parent, void *match, void *aux) { @@ -305,8 +307,12 @@ biosattach(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); -- cgit v1.2.3