mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
o misc little fixes.
This commit is contained in:
parent
1ac76d2e16
commit
9921c62234
@ -72,7 +72,6 @@ arg(allocatable_ARG, 'x', "allocatable", yes_no_arg)
|
||||
arg(resizeable_ARG, 'x', "resizeable", yes_no_arg)
|
||||
arg(yes_ARG, 'y', "yes", NULL)
|
||||
arg(zero_ARG, 'Z', "zero", yes_no_arg)
|
||||
arg(suspend_ARG, 'z', "suspend", NULL)
|
||||
|
||||
/* this should always be last */
|
||||
arg(ARG_COUNT, '-', "", NULL)
|
||||
|
@ -201,7 +201,7 @@ static int _read_params(struct lvcreate_params *lp, struct cmd_context *cmd,
|
||||
if (!_read_name_params(lp, cmd, &argc, &argv) ||
|
||||
!_read_size_params(lp, cmd, &argc, &argv) ||
|
||||
!_read_stripe_params(lp, cmd, &argc, &argv))
|
||||
return EINVALID_CMD_LINE;
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Should we zero the lv.
|
||||
|
@ -31,7 +31,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
* Exported table of valid switches
|
||||
*/
|
||||
struct arg the_args[ARG_COUNT + 1] = {
|
||||
@ -585,9 +585,6 @@ static int process_common_commands(struct command *com)
|
||||
{
|
||||
_current_settings = _default_settings;
|
||||
|
||||
if (arg_count(cmd, suspend_ARG))
|
||||
kill(getpid(), SIGSTOP);
|
||||
|
||||
if (arg_count(cmd, debug_ARG))
|
||||
_current_settings.debug = _LOG_FATAL +
|
||||
(arg_count(cmd, debug_ARG) - 1);
|
||||
|
@ -58,9 +58,9 @@ static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv)
|
||||
active = lv_active(lv);
|
||||
|
||||
if (active && !arg_count(cmd, force_ARG)) {
|
||||
if (yes_no_prompt
|
||||
("Do you really want to remove active logical volume \"%s\"? "
|
||||
"[y/n]: ", lv->name) == 'n') {
|
||||
if (yes_no_prompt("Do you really want to remove active "
|
||||
"logical volume \"%s\"? [y/n]: ",
|
||||
lv->name) == 'n') {
|
||||
log_print("Logical volume \"%s\" not removed",
|
||||
lv->name);
|
||||
return 0;
|
||||
@ -75,6 +75,12 @@ static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv)
|
||||
lv->name);
|
||||
}
|
||||
|
||||
log_verbose("Removing snapshot.");
|
||||
if (lv_is_cow(lv->vg, lv) && !vg_remove_snapshot(lv->vg, lv)) {
|
||||
stack;
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
log_verbose("Releasing logical volume \"%s\"", lv->name);
|
||||
if (!lv_remove(vg, lv)) {
|
||||
log_error("Error releasing logical volume \"%s\"", lv->name);
|
||||
|
Loading…
Reference in New Issue
Block a user