-/* $OpenBSD: bios.c,v 1.46 2022/10/16 15:03:39 kettenis Exp $ */
+/* $OpenBSD: bios.c,v 1.47 2023/03/15 08:20:52 jsg Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
*
};
char smbios_bios_date[64];
+char smbios_bios_version[64];
char smbios_board_vendor[64];
char smbios_board_prod[64];
char smbios_board_serial[64];
printf(" vendor %s",
fixstring(scratch));
if ((smbios_get_string(&bios, sb->version,
- scratch, sizeof(scratch))) != NULL)
- printf(" version \"%s\"",
- fixstring(scratch));
+ scratch, sizeof(scratch))) != NULL) {
+ sminfop = fixstring(scratch);
+ if (sminfop != NULL) {
+ strlcpy(smbios_bios_version,
+ sminfop,
+ sizeof(smbios_bios_version));
+ printf(" version \"%s\"", sminfop);
+ }
+ }
if ((smbios_get_string(&bios, sb->release,
scratch, sizeof(scratch))) != NULL) {
sminfop = fixstring(scratch);
-/* $OpenBSD: bios.c,v 1.128 2023/01/30 10:49:04 jsg Exp $ */
+/* $OpenBSD: bios.c,v 1.129 2023/03/15 08:20:52 jsg Exp $ */
/*
* Copyright (c) 1997-2001 Michael Shalayeff
char smbios_bios_date[64];
+char smbios_bios_version[64];
char smbios_board_vendor[64];
char smbios_board_prod[64];
char smbios_board_serial[64];
printf(" vendor %s",
fixstring(scratch));
if ((smbios_get_string(&bios, sb->version,
- scratch, sizeof(scratch))) != NULL)
- printf(" version \"%s\"",
- fixstring(scratch));
+ scratch, sizeof(scratch))) != NULL) {
+ sminfop = fixstring(scratch);
+ if (sminfop != NULL) {
+ strlcpy(smbios_bios_version,
+ sminfop,
+ sizeof(smbios_bios_version));
+ printf(" version \"%s\"",
+ sminfop);
+ }
+ }
if ((smbios_get_string(&bios, sb->release,
scratch, sizeof(scratch))) != NULL) {
sminfop = fixstring(scratch);