From: Zbigniew Jędrzejewski-Szmek Date: Wed, 10 Mar 2021 12:20:47 +0000 (+0100) Subject: generators: warn but ignore failure to write timeouts X-Git-Tag: v248-rc3~2^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=924f65030529d5a232c2be4ab6e2642dfdc2ea71;p=thirdparty%2Fsystemd.git generators: warn but ignore failure to write timeouts When we failed to split the options (because of disallowed quoting syntax, which might be a bug in its own), we would silently fail. Instead, let's emit a warning. Since we ignore the value if we cannot parse it anyway, let's ignore this error too. --- diff --git a/src/shared/generator.c b/src/shared/generator.c index 8b95c772db1..41922d67d8c 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -216,8 +216,12 @@ int generator_write_timeouts( r = fstab_filter_options(opts, "comment=systemd.device-timeout\0" "x-systemd.device-timeout\0", NULL, &timeout, filtered); - if (r <= 0) - return r; + if (r < 0) { + log_warning_errno(r, "Failed to parse fstab options, ignoring: %m"); + return 0; + } + if (r == 0) + return 0; r = parse_sec_fix_0(timeout, &u); if (r < 0) {