From 4f444794de11bd638ebe8daef5c8364c20a8e8ec Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Mon, 27 Jun 2011 11:44:03 +0000 Subject: dmi: Don't print dmidecode shell error Don't print the error "sh: dmidecode: not found" if dmidecode is not there. Uses stderr redirection to /dev/null (or NUL on Windows). Change-Id: I3ded8e1bad14b5e809185a79c4e3a17329b1ecb9 Signed-off-by: Stefan Reinauer Signed-off-by: Stefan Tauner Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/23802 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- dmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dmi.c') diff --git a/dmi.c b/dmi.c index 729cdb11..70b11774 100644 --- a/dmi.c +++ b/dmi.c @@ -34,6 +34,7 @@ #include #include +#include "platform.h" #include "flash.h" #include "programmer.h" @@ -292,7 +293,11 @@ out: #else /* CONFIG_INTERNAL_DMI */ #define DMI_COMMAND_LEN_MAX 300 -static const char *dmidecode_command = "dmidecode"; +#if IS_WINDOWS +static const char *dmidecode_command = "dmidecode.exe 2>NUL"; +#else +static const char *dmidecode_command = "dmidecode 2>/dev/null"; +#endif static char *get_dmi_string(const char *string_name) { -- cgit v1.2.3