summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup-generator.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/cryptsetup/cryptsetup-generator.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/cryptsetup/cryptsetup-generator.c')
-rw-r--r--src/cryptsetup/cryptsetup-generator.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 20dca844bb..7c79ca3561 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -308,7 +308,7 @@ int main(int argc, char *argv[]) {
_cleanup_strv_free_ char **disks_done = NULL;
_cleanup_fclose_ FILE *f = NULL;
unsigned n = 0;
- int r = EXIT_FAILURE, r2 = EXIT_FAILURE;
+ int r = EXIT_FAILURE, r2 = EXIT_FAILURE, z;
char **i;
if (argc > 1 && argc != 4) {
@@ -325,8 +325,9 @@ int main(int argc, char *argv[]) {
umask(0022);
- if (parse_proc_cmdline(parse_proc_cmdline_item) < 0)
- goto cleanup;
+ z = parse_proc_cmdline(parse_proc_cmdline_item);
+ if (z < 0)
+ log_warning("Failed to parse kernel command line, ignoring: %s", strerror(-z));
if (!arg_enabled) {
r = r2 = EXIT_SUCCESS;