redirect stderr of command to /dev/null

This commit is contained in:
Andreas Steffen
2011-09-08 18:29:52 +02:00
parent ddc261bcd3
commit 13f8356aca
+4 -4
View File
@@ -365,10 +365,10 @@ static char* extract_platform_info(void)
int value_len; int value_len;
/* open a pipe stream for reading the output of the lsb_release commmand */ /* open a pipe stream for reading the output of the lsb_release commmand */
file = popen("/usr/bin/lsb_release -d" , "r"); file = popen("/usr/bin/lsb_release -d 2> /dev/null" , "r");
if (!file) if (!file)
{ {
DBG2(DBG_IMC, "failed to run lsb_release command"); DBG2(DBG_IMC, "popen failed for lsb_release command");
return NULL; return NULL;
} }
@@ -401,10 +401,10 @@ static char* extract_platform_info(void)
buf[value_len] = ' '; buf[value_len] = ' ';
/* open a pipe stream for reading the output of the arch commmand */ /* open a pipe stream for reading the output of the arch commmand */
file = popen("/usr/bin/arch" , "r"); file = popen("/usr/bin/arch 2> /dev/null" , "r");
if (!file) if (!file)
{ {
DBG2(DBG_IMC, "failed to run arch command"); DBG2(DBG_IMC, "popen failed for arch command");
return NULL; return NULL;
} }