]> sourceware.org Git - lvm2.git/commitdiff
Define GET_NUM_PROPERTY_FN macro to simplify numeric property 'get' functions.
authorDave Wysochanski <dwysocha@redhat.com>
Fri, 20 Aug 2010 13:02:39 +0000 (13:02 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Fri, 20 Aug 2010 13:02:39 +0000 (13:02 +0000)
lib/report/properties.c

index cd65708521a70b9eb635ecbd45e17a4436ad183c..b99f63090485b1d973e2fb7dbe02e13e0d9b8b7e 100644 (file)
 #include "lvm-types.h"
 #include "metadata.h"
 
+#define GET_NUM_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.n_val = VALUE; \
+       return 1; \
+}
+
 static int _not_implemented(void *obj, struct lvm_property_type *prop)
 {
        log_errno(ENOSYS, "Function not implemented");
This page took 1.49212 seconds and 5 git commands to generate.