]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-event: unify two log_*() by log_full()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 23 Oct 2018 03:25:17 +0000 (12:25 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 23 Oct 2018 19:46:48 +0000 (04:46 +0900)
src/udev/udev-event.c

index ffaa8da96abb6a0e52bfcfb46282d889cc9e54ef..29ccdd7145d910ea5f6f31581d99549d898c25ab 100644 (file)
@@ -570,11 +570,10 @@ static int on_spawn_sigchld(sd_event_source *s, const siginfo_t *si, void *userd
                         sd_event_exit(sd_event_source_get_event(s), 0);
 
                         return 1;
-                } else if (spawn->accept_failure)
-                        log_debug("Process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
-                else
-                        log_warning("Process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
+                }
 
+                log_full(spawn->accept_failure ? LOG_DEBUG : LOG_WARNING,
+                         "Process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
                 break;
         case CLD_KILLED:
         case CLD_DUMPED: