summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2016-11-12 15:08:29 +0100
committerFranck Bui <fbui@suse.com>2016-11-17 18:16:50 +0100
commitdd6f9ac0d03d073f5dfbf1166f63c6bb64d7ce0c (patch)
treecaca468cda750cf1afab59bf01c62a6ff05a62f1 /src/core/execute.c
parenteedf223a30cca99b5d82f620437d2366be0eaf30 (diff)
core: add 'D' in confirmat spawn to show a full dump of the unit to spawn
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index b48a5732f3..6c65bdc361 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -740,7 +740,7 @@ static int ask_for_confirmation(const char *vc, Unit *u, const char *cmdline) {
}
for (;;) {
- r = ask_char(&c, "yfshi", "Execute %s? [y, f, s – h for help] ", e);
+ r = ask_char(&c, "yfshiD", "Execute %s? [y, f, s – h for help] ", e);
if (r < 0) {
write_confirm_error_fd(r, STDOUT_FILENO);
r = CONFIRM_EXECUTE;
@@ -748,17 +748,21 @@ static int ask_for_confirmation(const char *vc, Unit *u, const char *cmdline) {
}
switch (c) {
+ case 'D':
+ unit_dump(u, stdout, " ");
+ continue; /* ask again */
case 'f':
printf("Failing execution.\n");
r = CONFIRM_PRETEND_FAILURE;
break;
case 'h':
- printf(" f - fail, don't execute the command and pretend it failed\n"
+ printf(" D - dump, show the state of the unit\n"
+ " f - fail, don't execute the command and pretend it failed\n"
" h - help\n"
" i - info, show a short summary of the unit\n"
" s - skip, don't execute the command and pretend it succeeded\n"
" y - yes, execute the command\n");
- continue;
+ continue; /* ask again */
case 'i':
printf(" Description: %s\n"
" Unit: %s\n"