lkml.org 
[lkml]   [2022]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RESEND][PATCH 1/2] firmware: dmi: Prevent empty board name from being logged
Some systems do provide DMI entries for Base Board Information, however 
the strings supplied are null, e.g:

Legacy DMI 2.0 present.
DMI: /, BIOS 4.51 PG 09/11/97

Do not log the slash along with the empty board name in that case as it
carries no real information. If it's important to tell an inexistent
and an empty board name apart, then all DMI information can be retrieved
from sysfs and/or with `dmidecode'.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
drivers/firmware/dmi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-macro-ide-tty/drivers/firmware/dmi_scan.c
===================================================================
--- linux-macro-ide-tty.orig/drivers/firmware/dmi_scan.c
+++ linux-macro-ide-tty/drivers/firmware/dmi_scan.c
@@ -544,7 +544,7 @@ static void __init dmi_format_ids(char *
dmi_get_system_info(DMI_PRODUCT_NAME));

board = dmi_get_system_info(DMI_BOARD_NAME);
- if (board) {
+ if (board && *board) {
c += scnprintf(buf + c, len - c, "/");
c += print_filtered(buf + c, len - c, board);
}
\
 
 \ /
  Last update: 2022-01-03 00:34    [W:0.125 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site