[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2201020130590.56863@angie.orcam.me.uk>
Date: Sun, 2 Jan 2022 23:24:09 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Jean Delvare <jdelvare@...e.com>
cc: linux-kernel@...r.kernel.org
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@...am.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);
}
Powered by blists - more mailing lists