mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-31 21:18:26 +03:00
display: print skipped prompt
Since decisions in the silent mode may not be always obvious, print skipped prompt with answer 'n'. Also document '-qq' behaviour (single -q only shuts logging, while -qq sets silent mode).
This commit is contained in:
parent
76c06c7252
commit
11bedf1baf
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.107 -
|
Version 2.02.107 -
|
||||||
==================================
|
==================================
|
||||||
|
Display skipped prompt in silent mode.
|
||||||
Make reporting commands show help about possible sort keys on '-O help'.
|
Make reporting commands show help about possible sort keys on '-O help'.
|
||||||
Add metadata_percent to lvs_cols.
|
Add metadata_percent to lvs_cols.
|
||||||
Take account of parity areas with alloc anywhere in _calc_required_extents.
|
Take account of parity areas with alloc anywhere in _calc_required_extents.
|
||||||
|
@ -880,9 +880,6 @@ char yes_no_prompt(const char *prompt, ...)
|
|||||||
int c = 0, ret = 0;
|
int c = 0, ret = 0;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
if (silent_mode())
|
|
||||||
return 'n';
|
|
||||||
|
|
||||||
sigint_allow();
|
sigint_allow();
|
||||||
do {
|
do {
|
||||||
if (c == '\n' || !c) {
|
if (c == '\n' || !c) {
|
||||||
@ -890,6 +887,11 @@ char yes_no_prompt(const char *prompt, ...)
|
|||||||
vfprintf(stderr, prompt, ap);
|
vfprintf(stderr, prompt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
if (silent_mode()) {
|
||||||
|
fputc('n', stderr);
|
||||||
|
ret = 'n';
|
||||||
|
break;
|
||||||
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,7 +913,7 @@ char yes_no_prompt(const char *prompt, ...)
|
|||||||
sigint_restore();
|
sigint_restore();
|
||||||
|
|
||||||
if (c != '\n')
|
if (c != '\n')
|
||||||
fprintf(stderr, "\n");
|
fputc('\n', stderr);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -174,6 +174,7 @@ Overrides config file setting.
|
|||||||
.BR \-q ", " \-\-quiet
|
.BR \-q ", " \-\-quiet
|
||||||
Suppress output and log messages.
|
Suppress output and log messages.
|
||||||
Overrides \fB\-d\fP and \fB\-v\fP.
|
Overrides \fB\-d\fP and \fB\-v\fP.
|
||||||
|
Repeat once to also suppress any prompts with answer 'no'.
|
||||||
.TP
|
.TP
|
||||||
.BR \-\-yes
|
.BR \-\-yes
|
||||||
Don't prompt for confirmation interactively but instead always assume the
|
Don't prompt for confirmation interactively but instead always assume the
|
||||||
|
Loading…
Reference in New Issue
Block a user