[lvm-devel] [PATCH 08/12] Add GET_STR_PROPERTY_FN macro.
Dave Wysochanski
dwysocha at redhat.com
Thu Sep 9 20:13:05 UTC 2010
Signed-off-by: Dave Wysochanski <dwysocha at redhat.com>
---
lib/report/properties.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lib/report/properties.c b/lib/report/properties.c
index b99f630..20119b3 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -29,6 +29,15 @@ static int _ ## NAME ## _get (void *obj, struct lvm_property_type *prop) \
return 1; \
}
+#define GET_STR_PROPERTY_FN(NAME, VALUE) \
+static int _ ## NAME ## _get (void *obj, struct lvm_property_type *prop) \
+{ \
+ struct volume_group *vg = (struct volume_group *)obj; \
+\
+ prop->v.s_val = (char *)VALUE; \
+ return 1; \
+}
+
static int _not_implemented(void *obj, struct lvm_property_type *prop)
{
log_errno(ENOSYS, "Function not implemented");
--
1.7.2.1
More information about the lvm-devel
mailing list