From 5daacba2331f160cf793cb24dea3a1c868f5dafd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Nov 2018 11:10:24 +0100 Subject: [PATCH] systemctl: improve message when we skip a unit for editing a bit --- src/systemctl/systemctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 98beb80bfd4..b823d5d1160 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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);