diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-10-14 11:53:59 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-10-14 15:13:47 +0200 |
commit | ddaf2002c94a33863ef7adf69ad4cdffcfbd73c5 (patch) | |
tree | 928786ef3b917ad3c6640c40b191b616a6938750 | |
parent | e6691aa04be8bbe8768c6a7a520b36498066b9e8 (diff) | |
download | lvm2-ddaf2002c94a33863ef7adf69ad4cdffcfbd73c5.tar.gz |
lvconvert: use struct initializer
Always good to keep rest of structure initilized with zeros.
-rw-r--r-- | tools/lvconvert.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c index caef5d5a5..8ecbf3418 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -5290,7 +5290,11 @@ static int _lvconvert_detach_writecache(struct cmd_context *cmd, static int _writecache_zero(struct cmd_context *cmd, struct logical_volume *lv) { - struct wipe_params wp; + struct wipe_params wp = { + .do_wipe_signatures = 1, /* optional, to print warning if clobbering something */ + .do_zero = 1, /* required for dm-writecache to work */ + .zero_sectors = 1 + }; int ret; if (!activate_lv(cmd, lv)) { @@ -5298,11 +5302,6 @@ static int _writecache_zero(struct cmd_context *cmd, struct logical_volume *lv) return 0; } - wp.do_wipe_signatures = 1; /* optional, to print warning if clobbering something */ - wp.do_zero = 1; /* required for dm-writecache to work */ - wp.zero_sectors = 1; - wp.zero_value = 0; - ret = wipe_lv(lv, wp); if (!deactivate_lv(cmd, lv)) { |