diff options
author | snelson <snelson@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2010-05-07 20:09:04 +0000 |
---|---|---|
committer | snelson <snelson@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2010-05-07 20:09:04 +0000 |
commit | 234e9526ab20c1acc7b50263df061cd8f4e510a1 (patch) | |
tree | 544d1dea8706b7b9e3591f81eba8be45fc054ab8 /dmi.c | |
parent | c0a76f5940ce3d802cc3ecaa2d7c16c5c34cb0d0 (diff) | |
download | flashrom-234e9526ab20c1acc7b50263df061cd8f4e510a1.tar.gz |
convert programmer print messages to msg_p*
convert general print messages to msg_g*
a few fixes as suggested by Carl-Daniel
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@997 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'dmi.c')
-rw-r--r-- | dmi.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -53,12 +53,12 @@ static char *get_dmi_string(const char *string_name) "%s -s %s", dmidecode_command, string_name); dmidecode_pipe = popen(commandline, "r"); if (!dmidecode_pipe) { - printf_debug("DMI pipe open error\n"); + msg_perr("DMI pipe open error\n"); return NULL; } if (!fgets(answerbuf, DMI_MAX_ANSWER_LEN, dmidecode_pipe)) { if(ferror(dmidecode_pipe)) { - printf_debug("DMI pipe read error\n"); + msg_perr("DMI pipe read error\n"); pclose(dmidecode_pipe); return NULL; } else { @@ -70,7 +70,8 @@ static char *get_dmi_string(const char *string_name) while (!feof(dmidecode_pipe)) getc(dmidecode_pipe); if (pclose(dmidecode_pipe) != 0) { - printf_debug("DMI pipe close error\n"); + msg_pinfo("dmidecode execution unsucessfull - continuing " + "without DMI info\n"); return NULL; } @@ -78,7 +79,7 @@ static char *get_dmi_string(const char *string_name) if (answerbuf[0] != 0 && answerbuf[strlen(answerbuf) - 1] == '\n') answerbuf[strlen(answerbuf) - 1] = 0; - printf_debug("DMI string %s: \"%s\"\n", string_name, answerbuf); + msg_pdbg("DMI string %s: \"%s\"\n", string_name, answerbuf); result = strdup(answerbuf); if (!result) @@ -104,7 +105,7 @@ void dmi_init(void) chassis_type = get_dmi_string("chassis-type"); if (chassis_type && (!strcmp(chassis_type, "Notebook") || !strcmp(chassis_type, "Portable"))) { - printf_debug("Laptop detected via DMI\n"); + msg_pdbg("Laptop detected via DMI\n"); is_laptop = 1; } free(chassis_type); @@ -126,7 +127,7 @@ static int dmi_compare(const char *value, const char *pattern) int anchored = 0; int patternlen; - printf_debug("matching %s against %s\n", value, pattern); + msg_pspew("matching %s against %s\n", value, pattern); /* The empty string is part of all strings! */ if (pattern[0] == 0) return 1; |