systemctl-preset-all: do not return 0 if unit_file_preset_all() fails

Follow-up for ae9ff778cd
This commit is contained in:
Antonio Alvarez Feijoo
2026-01-03 04:53:44 +09:00
committed by Yu Watanabe
parent dc3078e3a9
commit 5b603f4d06
+2 -3
View File
@@ -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;