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

Ensure whole info is initialised

Since _create_dm_tree_node is copying whole structure,
make sure all members are initialized.
This commit is contained in:
Zdenek Kabelac 2012-01-25 21:50:50 +00:00
parent 0e6cacbbb6
commit fc5c61df97
2 changed files with 2 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.68 -
==================================
Reset all members of info struct in dm_tree_add_new_dev_with_udev_flags.
Add dmsetup wipe_table to replace table with one that uses error target.
Add 'blkdevname' and 'blkdevs_used' field to dmsetup info -c -o.
Add 'blkdevname' option to dmsetup ls --tree to see block device names.

View File

@ -1101,12 +1101,7 @@ struct dm_tree_node *dm_tree_add_new_dev_with_udev_flags(struct dm_tree *dtree,
return NULL;
}
info.major = 0;
info.minor = 0;
info.exists = 0;
info.live_table = 0;
info.inactive_table = 0;
info.read_only = 0;
memset(&info, 0, sizeof(info));
if (!(dnode = _create_dm_tree_node(dtree, name2, uuid2, &info,
context, 0)))