summaryrefslogtreecommitdiff
path: root/src/quotacheck/quotacheck.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 21:53:34 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-07 01:19:56 +0100
commitb5884878a2874447b2a9f07f324a7cd909d96d48 (patch)
tree7187916b29404dad30f53be8ed0393a095571e0d /src/quotacheck/quotacheck.c
parentf2997962ff8aeea577bed878d3bc4e4f64784e45 (diff)
util: simplify proc_cmdline() to reuse get_process_cmdline()
Also, make all parsing of the kernel cmdline non-fatal.
Diffstat (limited to 'src/quotacheck/quotacheck.c')
-rw-r--r--src/quotacheck/quotacheck.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c
index ed95b48c63..6f39dae2af 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("Failed to parse kernel command line, ignoring: %s", strerror(-r));
+
test_files();
if (!arg_force) {
@@ -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);
+
+ return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}