mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: leave empty report field for 0
Since we do not support LVs with 0 size, use this value as 'error' value for devices without origin, and leave this field blank as in other cases.
This commit is contained in:
parent
15115b61c0
commit
9d445f371c
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Report blank field if the LV doesn't have an origin instead of 0.
|
||||
Do not take a free lv name argument for lvconvert --thinpool option.
|
||||
Avoid flushing thin pool when quering for transaction_id.
|
||||
Add internal function lv_layer() to obtain layer name for LV.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2013 Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This file is part of LVM2.
|
||||
*
|
||||
@ -590,7 +590,10 @@ static int _originsize_disp(struct dm_report *rh, struct dm_pool *mem,
|
||||
const struct logical_volume *lv = (const struct logical_volume *) data;
|
||||
uint64_t size;
|
||||
|
||||
size = lv_origin_size(lv);
|
||||
if (!(size = lv_origin_size(lv))) {
|
||||
dm_report_field_set_value(field, "", NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return _size64_disp(rh, mem, field, &size, private);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user