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

wipe: convert zero_value to uint8_t

We always write this value as byte.
This commit is contained in:
Zdenek Kabelac 2020-09-15 16:40:53 +02:00
parent ec4e8b5c0e
commit d588de77aa
2 changed files with 4 additions and 4 deletions

View File

@ -797,9 +797,9 @@ struct logical_volume *lv_create_empty(const char *name,
struct volume_group *vg);
struct wipe_params {
int do_zero; /* should we do zeroing of LV start? */
uint64_t zero_sectors; /* sector count to zero */
int zero_value; /* zero-out with this value */
uint8_t zero_value; /* zero-out with this value */
int do_zero; /* should we do zeroing of LV start? */
int do_wipe_signatures; /* should we wipe known signatures found on LV? */
int yes; /* answer yes automatically to all questions */
force_t force; /* force mode */

View File

@ -325,8 +325,8 @@ static int _init_mirror_log(struct cmd_context *cmd,
if (activation()) {
if (!wipe_lv(log_lv, (struct wipe_params)
{ .do_zero = 1, .zero_sectors = log_lv->size,
.zero_value = in_sync ? -1 : 0 })) {
{ .zero_sectors = log_lv->size, .do_zero = 1,
.zero_value = in_sync ? 0xff : 0 })) {
log_error("Aborting. Failed to wipe mirror log.");
goto deactivate_and_revert_new_lv;
}