From a90221d8247e4d8fd36c1472e8acc918b1452fe0 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Mon, 25 Oct 2010 14:08:32 +0000 Subject: [PATCH] Add 'is_integer' flag into internal lvm_property_type. Add 'is_integer' flag similar to 'is_string'. Suggested in review by Petr Rockai. --- lib/report/properties.c | 4 ++-- lib/report/properties.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/report/properties.c b/lib/report/properties.c index c08ddfdb4..339fd847a 100644 --- a/lib/report/properties.c +++ b/lib/report/properties.c @@ -227,11 +227,11 @@ GET_VG_NUM_PROPERTY_FN(vg_mda_copies, (vg_mda_copies(vg))) #define STR DM_REPORT_FIELD_TYPE_STRING #define NUM DM_REPORT_FIELD_TYPE_NUMBER #define FIELD(type, strct, sorttype, head, field, width, fn, id, desc, settable) \ - { type, #id, settable, sorttype == STR, { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, + { type, #id, settable, sorttype == STR, sorttype == NUM, { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, struct lvm_property_type _properties[] = { #include "columns.h" - { 0, "", 0, 0, { .integer = 0 }, _not_implemented_get, _not_implemented_set }, + { 0, "", 0, 0, 0, { .integer = 0 }, _not_implemented_get, _not_implemented_set }, }; #undef STR diff --git a/lib/report/properties.h b/lib/report/properties.h index 18e5ab90c..054f4007f 100644 --- a/lib/report/properties.h +++ b/lib/report/properties.h @@ -24,6 +24,7 @@ struct lvm_property_type { const char *id; unsigned is_settable:1; unsigned is_string:1; + unsigned is_integer:1; union { char *string; uint64_t integer;