summaryrefslogtreecommitdiffstats
path: root/dmi.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@student.tuwien.ac.at>2011-06-27 11:44:03 +0000
committerNico Huber <nico.h@gmx.de>2018-03-08 09:17:52 +0000
commit4f444794de11bd638ebe8daef5c8364c20a8e8ec (patch)
tree14333facfdb159334f5297dde7b9357b2a0c2bb5 /dmi.c
parent1d50abc4cc1892e2b81999396de795f0c63b57ca (diff)
downloadflashrom-4f444794de11bd638ebe8daef5c8364c20a8e8ec.tar.gz
flashrom-4f444794de11bd638ebe8daef5c8364c20a8e8ec.tar.bz2
flashrom-4f444794de11bd638ebe8daef5c8364c20a8e8ec.zip
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 <stefan.reinauer@coreboot.org> Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/23802 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'dmi.c')
-rw-r--r--dmi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dmi.c b/dmi.c
index 729cdb119..70b117749 100644
--- a/dmi.c
+++ b/dmi.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#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)
{