Commit 29ac4085 authored by spiiroin's avatar spiiroin

[usb-moded] Do not redirect stderr to /dev/null when logging to stderr

The idea seems to be that when usb-moded is executed in "normal manner" it
logs warnings / more server issues to syslog and possible output from
subprocesses executed by usb-moded gets redirected to /dev/null to avoid
journal spamming. However, now the redirection happens also when explicitly
requesting logging to stderr.

Redirect standard outputs only when neither debug logging nor logging to
stderr is requested.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent 06a379d4
......@@ -1279,7 +1279,7 @@ int main(int argc, char* argv[])
* - - - - - - - - - - - - - - - - - - - */
/* silence usb_moded_system() calls */
if(log_type != LOG_TO_STDERR || log_level != LOG_DEBUG )
if(log_type != LOG_TO_STDERR && log_level != LOG_DEBUG )
{
freopen("/dev/null", "a", stdout);
freopen("/dev/null", "a", stderr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment