diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-12-12 19:54:51 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2014-12-12 19:54:51 +0200 |
commit | f47781d88ca6bf69d6b1dd0703b2b283482e5c09 (patch) | |
tree | 6a8f1f74e8fba0a2c20d710848d00b0338f6e341 /src/quotacheck | |
parent | 5eef597e931b0428bb984dc2bf0736d032a9198c (diff) | |
download | systemd-f47781d88ca6bf69d6b1dd0703b2b283482e5c09.tar.gz |
Imported Upstream version 218
Diffstat (limited to 'src/quotacheck')
-rw-r--r-- | src/quotacheck/quotacheck.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c index ed95b48c63..9ae3abd990 100644 --- a/src/quotacheck/quotacheck.c +++ b/src/quotacheck/quotacheck.c @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) { }; pid_t pid; + int r; if (argc > 1) { log_error("This program takes no arguments."); @@ -86,7 +87,10 @@ int main(int argc, char *argv[]) { umask(0022); - parse_proc_cmdline(parse_proc_cmdline_item); + r = parse_proc_cmdline(parse_proc_cmdline_item); + if (r < 0) + log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m"); + test_files(); if (!arg_force) { @@ -99,7 +103,7 @@ int main(int argc, char *argv[]) { pid = fork(); if (pid < 0) { - log_error("fork(): %m"); + log_error_errno(errno, "fork(): %m"); return EXIT_FAILURE; } else if (pid == 0) { /* Child */ @@ -107,5 +111,7 @@ int main(int argc, char *argv[]) { _exit(1); /* Operational error */ } - return wait_for_terminate_and_warn("quotacheck", pid) >= 0 ? EXIT_SUCCESS : EXIT_FAILURE; + r = wait_for_terminate_and_warn("quotacheck", pid, true); + + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } |