diff options
author | Tony Asleson <tasleson@redhat.com> | 2015-05-04 15:20:55 -0500 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2015-05-06 08:51:04 -0500 |
commit | dc5190de74893ede7d3170b861ce8ae9327ecfae (patch) | |
tree | c4c1e6d68013e48da42d48a3603870e9ad6f09e1 | |
parent | e8c11c7df0f1d582494922cbadb717296c02e05b (diff) | |
download | lvm2-dc5190de74893ede7d3170b861ce8ae9327ecfae.tar.gz |
lvm2app: Correct missing string properties
Synopsis: STR_LIST needs to be treated as STR for properties.
For any lvm property that was internally 'typed' as a string list we were failing
to return a string in the property API. This was due to the fact that for the
properties to work the value needs to either be evaulated as a string or a
number. This change corrects the macro used to build the memory array of
structures so that the string bitfield is set as needed to ensure that the value
is a string.
https://bugzilla.redhat.com/show_bug.cgi?id=1139920
Signed-off-by: Tony Asleson <tasleson@redhat.com>
-rw-r--r-- | lib/properties/prop_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/properties/prop_common.h b/lib/properties/prop_common.h index 0b1678d38..9cc963aba 100644 --- a/lib/properties/prop_common.h +++ b/lib/properties/prop_common.h @@ -132,6 +132,6 @@ static int _ ## NAME ## _get (const void *obj, struct lvm_property_type *prop) \ #define FIELD_MODIFIABLE 0x00000001 #define FIELD(type, strct, field_type, head, field, width, fn, id, desc, settable) \ - { type, #id, settable, field_type == STR, ((field_type == NUM) || (field_type == BIN) || (field_type == SIZ) || (field_type == PCT) || (field_type == SNUM)), ((field_type == SNUM) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, + { type, #id, settable, (field_type == STR || field_type == STR_LIST), ((field_type == NUM) || (field_type == BIN) || (field_type == SIZ) || (field_type == PCT) || (field_type == SNUM)), ((field_type == SNUM) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, #endif |