mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvremove: initilize struct list
This commit is contained in:
parent
80fa3511be
commit
533a87d0ea
@ -18,7 +18,9 @@
|
|||||||
int lvremove(struct cmd_context *cmd, int argc, char **argv)
|
int lvremove(struct cmd_context *cmd, int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct processing_handle *handle = NULL;
|
struct processing_handle *handle = NULL;
|
||||||
struct lvremove_params lp = { 0 };
|
struct lvremove_params lp = {
|
||||||
|
.removed_uuids = DM_LIST_HEAD_INIT(lp.removed_uuids),
|
||||||
|
};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!argc && !arg_is_set(cmd, select_ARG)) {
|
if (!argc && !arg_is_set(cmd, select_ARG)) {
|
||||||
@ -35,8 +37,6 @@ int lvremove(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
dm_list_init(&lp.removed_uuids);
|
|
||||||
|
|
||||||
handle->custom_handle = &lp;
|
handle->custom_handle = &lp;
|
||||||
|
|
||||||
ret = process_each_lv(cmd, argc, argv, NULL, NULL, READ_FOR_UPDATE, handle,
|
ret = process_each_lv(cmd, argc, argv, NULL, NULL, READ_FOR_UPDATE, handle,
|
||||||
|
Loading…
Reference in New Issue
Block a user