systemctl: improve message when we skip a unit for editing a bit

This commit is contained in:
Lennart Poettering 2018-11-29 11:10:24 +01:00
parent 92d6b0bfdc
commit 5daacba233
1 changed files with 2 additions and 4 deletions

View File

@ -6845,10 +6845,8 @@ static int unit_file_create_copy(
r = ask_char(&response, "yn", "\"%s\" already exists. Overwrite with \"%s\"? [(y)es, (n)o] ", new_path, fragment_path);
if (r < 0)
return r;
if (response != 'y') {
log_warning("%s ignored", unit_name);
return -EKEYREJECTED;
}
if (response != 'y')
return log_warning_errno(SYNTHETIC_ERRNO(EKEYREJECTED), "%s skipped.", unit_name);
}
r = create_edit_temp_file(new_path, fragment_path, &tmp_path);