From: Lennart Poettering Date: Thu, 29 Nov 2018 10:10:24 +0000 (+0100) Subject: systemctl: improve message when we skip a unit for editing a bit X-Git-Tag: v240~176^2~3 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=5daacba2331f160cf793cb24dea3a1c868f5dafd;p=systemd%2F.git systemctl: improve message when we skip a unit for editing a bit --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 98beb80bfd..b823d5d116 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);