From: Antonio Alvarez Feijoo Date: Fri, 2 Jan 2026 14:20:20 +0000 (+0100) Subject: systemctl-preset-all: do not return 0 if unit_file_preset_all() fails X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b603f4d0691f7035cfbef2f2824f839fa2420b9;p=thirdparty%2Fsystemd.git systemctl-preset-all: do not return 0 if unit_file_preset_all() fails Follow-up for ae9ff778cd141f9d24dd4743489b7e1000f22347 --- diff --git a/src/systemctl/systemctl-preset-all.c b/src/systemctl/systemctl-preset-all.c index b9c4a6d5f3c..bf681a6d36a 100644 --- a/src/systemctl/systemctl-preset-all.c +++ b/src/systemctl/systemctl-preset-all.c @@ -27,9 +27,8 @@ int verb_preset_all(int argc, char *argv[], void *userdata) { r = unit_file_preset_all(arg_runtime_scope, unit_file_flags_from_args(), arg_root, arg_preset_mode, &changes, &n_changes); install_changes_dump(r, "preset", changes, n_changes, arg_quiet); - - if (r > 0) - r = 0; + if (r < 0) + return r; } else { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;