summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2016-11-13 09:32:52 +0100
committerFranck Bui <fbui@suse.com>2016-11-17 18:16:49 +0100
commit2bcc330942d526b6004a67c92e284ad842bd5e59 (patch)
tree8fb152653123ca5b044c99804a5cac414154ab0f /src
parent3b20f877ade5599dab124474055d2e56c3dcdb15 (diff)
core: in confirm_spawn, the meaning of 'n' and 's' choices are confusing
Before this patch we had: - "no" which gives "failing execution" but the command is actually assumed as succeed. - "skip" which gives "skipping", but the command is assumed to have failed, which ends up with "Failed to start ..." on the console. Now we have: - "fail" which gives "failing execution" and the command is indeed assumed as failed. - "skip" which gives "skipping execution" and the command is assumed as succeed.
Diffstat (limited to 'src')
-rw-r--r--src/core/execute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 8b09f71717..10e9dd7cc8 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -731,7 +731,7 @@ static int ask_for_confirmation(const char *vc, const char *cmdline) {
return CONFIRM_EXECUTE;
}
- r = ask_char(&c, "yns", "Execute %s? [Yes, No, Skip] ", cmdline);
+ r = ask_char(&c, "yfs", "Execute %s? [Yes, Fail, Skip] ", cmdline);
if (r < 0) {
write_confirm_error_fd(r, STDOUT_FILENO);
r = CONFIRM_EXECUTE;
@@ -739,13 +739,13 @@ static int ask_for_confirmation(const char *vc, const char *cmdline) {
}
switch (c) {
- case 'n':
+ case 'f':
printf("Failing execution.\n");
- r = CONFIRM_PRETEND_SUCCESS;
+ r = CONFIRM_PRETEND_FAILURE;
break;
case 's':
printf("Skipping execution.\n");
- r = CONFIRM_PRETEND_FAILURE;
+ r = CONFIRM_PRETEND_SUCCESS;
break;
case 'y':
r = CONFIRM_EXECUTE;