summaryrefslogtreecommitdiff
path: root/dmi.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-01-04 22:54:07 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-01-04 22:54:07 +0000
commit4f76e2f91d69dae46c42155d65b80e1d0f2bbdfc (patch)
tree7ac561c734007cfe88577cdad895f87524e3184f /dmi.c
parentfc2c3133fbb24b2e770c6f3bea0a850272a70bbe (diff)
downloadflashrom-4f76e2f91d69dae46c42155d65b80e1d0f2bbdfc.tar.gz
Introduce msg_*warn.
Also, unify all outputs of "Warning:" and "Error:" to use normal capitalization instead of mixing it with all capitals. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1643 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'dmi.c')
-rw-r--r--dmi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/dmi.c b/dmi.c
index a6e2146..242889f 100644
--- a/dmi.c
+++ b/dmi.c
@@ -105,7 +105,7 @@ static char *get_dmi_string(const char *string_name)
"%s -s %s", dmidecode_command, string_name);
dmidecode_pipe = popen(commandline, "r");
if (!dmidecode_pipe) {
- msg_perr("DMI pipe open error\n");
+ msg_perr("Opening DMI pipe failed!\n");
return NULL;
}
@@ -127,13 +127,11 @@ static char *get_dmi_string(const char *string_name)
}
} while (answerbuf[0] == '#');
- /* Toss all output above DMI_MAX_ANSWER_LEN away to prevent
- deadlock on pclose. */
+ /* Discard all output exceeding DMI_MAX_ANSWER_LEN to prevent deadlock on pclose. */
while (!feof(dmidecode_pipe))
getc(dmidecode_pipe);
if (pclose(dmidecode_pipe) != 0) {
- msg_pinfo("dmidecode execution unsuccessful - continuing "
- "without DMI info\n");
+ msg_pwarn("dmidecode execution unsuccessful - continuing without DMI info\n");
return NULL;
}
@@ -144,7 +142,7 @@ static char *get_dmi_string(const char *string_name)
result = strdup(answerbuf);
if (!result)
- msg_perr("WARNING: Out of memory - DMI support fails");
+ msg_pwarn("Warning: Out of memory - DMI support fails");
return result;
}