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

Add 'is_integer' flag into internal lvm_property_type.

Add 'is_integer' flag similar to 'is_string'.
Suggested in review by Petr Rockai.
This commit is contained in:
Dave Wysochanski 2010-10-25 14:08:32 +00:00
parent 2aa06d73ca
commit a90221d824
2 changed files with 3 additions and 2 deletions

View File

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

View File

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