[lvm-devel] LVM2/lib/report properties.c
Zdenek Kabelac
zkabelac at redhat.com
Fri Aug 20 13:49:29 UTC 2010
Dne 20.8.2010 15:02, wysochanski at sourceware.org napsal(a):
> CVSROOT: /cvs/lvm2
> Module name: LVM2
> Changes by: wysochanski at sourceware.org 2010-08-20 13:02:39
>
> Modified files:
> lib/report : properties.c
>
> Log message:
> Define GET_NUM_PROPERTY_FN macro to simplify numeric property 'get' functions.
>
> Patches:
> http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/properties.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3
>
> --- LVM2/lib/report/properties.c 2010/08/20 12:45:09 1.2
> +++ LVM2/lib/report/properties.c 2010/08/20 13:02:39 1.3
> @@ -20,6 +20,15 @@
> #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; \
> +}
> +
Is this going to be part of liblvm API - or it's only purpose is to be used
through liblvm2api - in that case it would be better to have this code
compiled as a part of liblvm2api library and not increasing size of liblvm ?
Zdenek
More information about the lvm-devel
mailing list