1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvm2app: fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported}

Fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported},
including internal functions pvseg_is_allocated and vg_is_resizeable
which are not yet exposed in lvm2app but make them consistent with the
rest.
This commit is contained in:
Peter Rajnoha 2016-01-15 14:39:43 +01:00
parent 1752f5c31e
commit 7559af2334
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.140 - Version 2.02.140 -
=================================== ===================================
Fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported}.
Add kernel_discards report field to display thin pool discard used in kernel. Add kernel_discards report field to display thin pool discard used in kernel.
Correct checking of target presence when driver access is disabled. Correct checking of target presence when driver access is disabled.
Eval poolmetadatasize arg earlier in lvresize. Eval poolmetadatasize arg earlier in lvresize.

View File

@ -305,7 +305,7 @@ struct pv_segment {
uint32_t lv_area; /* Index to area in LV segment */ uint32_t lv_area; /* Index to area in LV segment */
}; };
#define pvseg_is_allocated(pvseg) ((pvseg)->lvseg) #define pvseg_is_allocated(pvseg) ((pvseg)->lvseg ? 1 : 0)
/* /*
* Properties of each format instance type. * Properties of each format instance type.
@ -1204,9 +1204,9 @@ int pv_change_metadataignore(struct physical_volume *pv, uint32_t mda_ignore);
int vg_flag_write_locked(struct volume_group *vg); int vg_flag_write_locked(struct volume_group *vg);
int vg_check_write_mode(struct volume_group *vg); int vg_check_write_mode(struct volume_group *vg);
#define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED) #define vg_is_clustered(vg) ((vg_status((vg)) & CLUSTERED) ? 1 : 0)
#define vg_is_exported(vg) (vg_status((vg)) & EXPORTED_VG) #define vg_is_exported(vg) ((vg_status((vg)) & EXPORTED_VG) ? 1 : 0)
#define vg_is_resizeable(vg) (vg_status((vg)) & RESIZEABLE_VG) #define vg_is_resizeable(vg) ((vg_status((vg)) & RESIZEABLE_VG) ? 1 : 0)
int lv_has_unknown_segments(const struct logical_volume *lv); int lv_has_unknown_segments(const struct logical_volume *lv);
int vg_has_unknown_segments(const struct volume_group *vg); int vg_has_unknown_segments(const struct volume_group *vg);