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:
parent
2aa06d73ca
commit
a90221d824
@ -227,11 +227,11 @@ GET_VG_NUM_PROPERTY_FN(vg_mda_copies, (vg_mda_copies(vg)))
|
|||||||
#define STR DM_REPORT_FIELD_TYPE_STRING
|
#define STR DM_REPORT_FIELD_TYPE_STRING
|
||||||
#define NUM DM_REPORT_FIELD_TYPE_NUMBER
|
#define NUM DM_REPORT_FIELD_TYPE_NUMBER
|
||||||
#define FIELD(type, strct, sorttype, head, field, width, fn, id, desc, settable) \
|
#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[] = {
|
struct lvm_property_type _properties[] = {
|
||||||
#include "columns.h"
|
#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
|
#undef STR
|
||||||
|
@ -24,6 +24,7 @@ struct lvm_property_type {
|
|||||||
const char *id;
|
const char *id;
|
||||||
unsigned is_settable:1;
|
unsigned is_settable:1;
|
||||||
unsigned is_string:1;
|
unsigned is_string:1;
|
||||||
|
unsigned is_integer:1;
|
||||||
union {
|
union {
|
||||||
char *string;
|
char *string;
|
||||||
uint64_t integer;
|
uint64_t integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user