1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Move label_init up in code stack

label_exit() is called destroy_toolcontext() and we are now
using standard dm_list function for destroy, we have to make sure
dm_list gets initialized properly.
This commit is contained in:
Zdenek Kabelac 2012-02-08 13:44:49 +00:00
parent a7e2da0585
commit b93c1332d1

View File

@ -896,8 +896,6 @@ static int _init_formats(struct cmd_context *cmd)
const struct dm_config_node *cn;
#endif
label_init();
#ifdef LVM1_INTERNAL
if (!(fmt = init_lvm1_format(cmd)))
return 0;
@ -1268,6 +1266,7 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
dm_list_init(&cmd->segtypes);
dm_list_init(&cmd->tags);
dm_list_init(&cmd->config_files);
label_init();
/* FIXME Make this configurable? */
reset_lvm_errno(1);