1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Peter Rajnoha 2014-06-17 18:14:38 +02:00
parent 94316dfe9d
commit d09590c4b6
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -343,6 +343,7 @@ struct lvm_property_type _properties[] = {
#undef STR
#undef NUM
#undef SIZ
#undef PCT
#undef STR_LIST
#undef FIELD