summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2014-06-17 18:14:38 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2014-06-17 18:14:57 +0200
commitd09590c4b601f261d164fd253c7f2b9864cbf7ab (patch)
treeebbc74004544c6b63f018f7565559a388e4996e2
parent94316dfe9d61a7b46c88458e4a8232667fde192a (diff)
downloadlvm2-d09590c4b601f261d164fd253c7f2b9864cbf7ab.tar.gz
prop: update FIELD macro to accomodate the differentiation of number, size and percent field values
The differentiation of the original number field into number, size and percent field types has been introduced with recent changes for report selection support.
-rw-r--r--lib/properties/prop_common.h2
-rw-r--r--lib/report/properties.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/properties/prop_common.h b/lib/properties/prop_common.h
index 6972f9f23..6d4c2e42f 100644
--- a/lib/properties/prop_common.h
+++ b/lib/properties/prop_common.h
@@ -128,6 +128,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, { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },
+ { type, #id, settable, field_type == STR, ((field_type == NUM) || (field_type == SIZ) || (field_type == PCT)), { .integer = 0 }, _ ## id ## _get, _ ## id ## _set },
#endif
diff --git a/lib/report/properties.c b/lib/report/properties.c
index 0c49b0fa1..ce3ed5382 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -343,6 +343,7 @@ struct lvm_property_type _properties[] = {
#undef STR
#undef NUM
#undef SIZ
+#undef PCT
#undef STR_LIST
#undef FIELD