mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Return PERCENT_INVALID for error case
If the percent value could not be determined return PERCENT_INVALID. Indent function with tabs.
This commit is contained in:
parent
a5d006d515
commit
1936d75b3c
@ -1,5 +1,6 @@
|
||||
Version 2.02.80 -
|
||||
====================================
|
||||
Return defined value for errors in _copy_percent() and _snap_percent().
|
||||
Correct return code of cmirrord when issuing 'start' when already running.
|
||||
Fix wrongly paired unlocking of global lock in pvchange. (2.02.66)
|
||||
Add backtraces for backup and backup_remove fail paths.
|
||||
|
@ -88,13 +88,16 @@ static int _not_implemented_set(void *obj, struct lvm_property_type *prop)
|
||||
|
||||
static percent_t _copy_percent(const struct logical_volume *lv) {
|
||||
percent_t perc;
|
||||
lv_mirror_percent(lv->vg->cmd, (struct logical_volume *) lv, 0, &perc, NULL);
|
||||
if (!lv_mirror_percent(lv->vg->cmd, (struct logical_volume *) lv,
|
||||
0, &perc, NULL))
|
||||
perc = PERCENT_INVALID;
|
||||
return perc;
|
||||
}
|
||||
|
||||
static percent_t _snap_percent(const struct logical_volume *lv) {
|
||||
percent_t perc;
|
||||
lv_snapshot_percent(lv, &perc);
|
||||
if (!lv_snapshot_percent(lv, &perc))
|
||||
perc = PERCENT_INVALID;
|
||||
return perc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user