mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
dev-type: print aborting log_error
When wiping is aborted print immediate log_error message (log_error comes 1st.)
This commit is contained in:
parent
a94abc0fdd
commit
1f72f8ed40
@ -507,8 +507,10 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
|
|||||||
if (!_type_in_flag_list(type, types_no_prompt)) {
|
if (!_type_in_flag_list(type, types_no_prompt)) {
|
||||||
if (!yes && (force == PROMPT) &&
|
if (!yes && (force == PROMPT) &&
|
||||||
yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
|
yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
|
||||||
"Wipe it? [y/n] ", type, name, offset) != 'y')
|
"Wipe it? [y/n]: ", type, name, offset) == 'n') {
|
||||||
return_0;
|
log_error("Aborted wiping of %s.", type);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
log_print_unless_silent(_msg_wiping, type, name);
|
log_print_unless_silent(_msg_wiping, type, name);
|
||||||
} else
|
} else
|
||||||
log_verbose(_msg_wiping, type, name);
|
log_verbose(_msg_wiping, type, name);
|
||||||
@ -591,9 +593,11 @@ static int _wipe_signature(struct device *dev, const char *type, const char *nam
|
|||||||
|
|
||||||
/* Specifying --yes => do not ask. */
|
/* Specifying --yes => do not ask. */
|
||||||
if (!yes && (force == PROMPT) &&
|
if (!yes && (force == PROMPT) &&
|
||||||
yes_no_prompt("WARNING: %s detected on %s. Wipe it? [y/n] ",
|
yes_no_prompt("WARNING: %s detected on %s. Wipe it? [y/n]: ",
|
||||||
type, name) != 'y')
|
type, name) == 'n') {
|
||||||
return_0;
|
log_error("Aborted wiping of %s.", type);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
log_print_unless_silent("Wiping %s on %s.", type, name);
|
log_print_unless_silent("Wiping %s on %s.", type, name);
|
||||||
if (!dev_set(dev, offset_found, wipe_len, 0)) {
|
if (!dev_set(dev, offset_found, wipe_len, 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user