summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kuethe <ckuethe@cvs.openbsd.org>2007-11-03 05:49:18 +0000
committerChris Kuethe <ckuethe@cvs.openbsd.org>2007-11-03 05:49:18 +0000
commit013766baf5b799a36485e12686090778abe2032b (patch)
tree580a804b152bcaf8379c716b9ccee33958f0c4d2
parent5a5d4c7a2618ac3a50c65233046d5ecbeaee1331 (diff)
don't spam dmesg with huge, whitespace padded bios strings.
ok beck, gwk
-rw-r--r--sys/arch/amd64/amd64/bios.c10
-rw-r--r--sys/arch/i386/i386/bios.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/bios.c b/sys/arch/amd64/amd64/bios.c
index cbf4319e5e8..d685f03e3ba 100644
--- a/sys/arch/amd64/amd64/bios.c
+++ b/sys/arch/amd64/amd64/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.12 2007/08/06 16:12:25 gwk Exp $ */
+/* $OpenBSD: bios.c,v 1.13 2007/11/03 05:49:17 ckuethe Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
*
@@ -131,13 +131,15 @@ bios_attach(struct device *parent, struct device *self, void *aux)
printf("\n%s:", sc->sc_dev.dv_xname);
if ((smbios_get_string(&bios, sb->vendor,
scratch, sizeof(scratch))) != NULL)
- printf(" vendor %s", scratch);
+ printf(" vendor %s",
+ fixstring(scratch));
if ((smbios_get_string(&bios, sb->version,
scratch, sizeof(scratch))) != NULL)
- printf(" version \"%s\"", scratch);
+ printf(" version \"%s\"",
+ fixstring(scratch));
if ((smbios_get_string(&bios, sb->release,
scratch, sizeof(scratch))) != NULL)
- printf(" date %s", scratch);
+ printf(" date %s", fixstring(scratch));
}
smbios_info(sc->sc_dev.dv_xname);
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c
index bb5d7f8bfd0..44d360106c7 100644
--- a/sys/arch/i386/i386/bios.c
+++ b/sys/arch/i386/i386/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.70 2007/08/06 16:12:25 gwk Exp $ */
+/* $OpenBSD: bios.c,v 1.71 2007/11/03 05:48:49 ckuethe Exp $ */
/*
* Copyright (c) 1997-2001 Michael Shalayeff
@@ -271,13 +271,15 @@ biosattach(struct device *parent, struct device *self, void *aux)
if ((smbios_get_string(&bios, sb->vendor,
scratch, sizeof(scratch))) != NULL)
- printf(" vendor %s", scratch);
+ printf(" vendor %s",
+ fixstring(scratch));
if ((smbios_get_string(&bios, sb->version,
scratch, sizeof(scratch))) != NULL)
- printf(" version \"%s\"", scratch);
+ printf(" version \"%s\"",
+ fixstring(scratch));
if ((smbios_get_string(&bios, sb->release,
scratch, sizeof(scratch))) != NULL)
- printf(" date %s", scratch);
+ printf(" date %s", fixstring(scratch));
}
smbios_info(sc->sc_dev.dv_xname);
break;