From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 11/20] Make generic GET_*_PROPERTY_FN macros and define secondary macro for vg, pv, lv.
Date: Thu, 23 Sep 2010 14:36:42 +0200 [thread overview]
Message-ID: <4C9B49DA.3050402@redhat.com> (raw)
In-Reply-To: <1285189592-26525-12-git-send-email-dwysocha@redhat.com>
Dne 22.9.2010 23:06, Dave Wysochanski napsal(a):
> Will need similar macros for VG, PV and LV, so define a generic one, and just
> pass in the struct name and variable name for the specific macro.
>
> Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
> ---
> lib/report/properties.c | 25 +++++++++++++++++++++++--
> 1 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/lib/report/properties.c b/lib/report/properties.c
> index 9e3cad3..b39a979 100644
> --- a/lib/report/properties.c
> +++ b/lib/report/properties.c
> @@ -20,14 +20,35 @@
> #include "lvm-types.h"
> #include "metadata.h"
>
> -#define GET_NUM_PROPERTY_FN(NAME, VALUE) \
> +#define GET_NUM_PROPERTY_FN(NAME, VALUE, STRUCT, VAR) \
> static int _ ## NAME ## _get (void *obj, struct lvm_property_type *prop) \
> { \
> - struct volume_group *vg = (struct volume_group *)obj; \
> + struct STRUCT *VAR = (struct STRUCT *)obj; \
struct STRUCT *VAR
looks weird... isn't there something better?
Zdenek
next prev parent reply other threads:[~2010-09-23 12:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 21:06 [PATCH 00/20] Add lvm vg and pv properties for lvm2app Dave Wysochanski
2010-09-22 21:06 ` [PATCH 01/20] Refactor metadata.[ch] into vg.[ch] for vg functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 02/20] Refactor metadata.[ch] into pv.[ch] for pv functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 03/20] Refactor metadata.[ch] into lv.[ch] for lv functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 04/20] Add {pv|vg|lv}_attr_dup() functions and refactor 'disp' functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 05/20] Simplify logic to create 'attr' strings Dave Wysochanski
2010-09-22 21:06 ` [PATCH 06/20] Add id_format_and_copy() common function and call from _uuid_disp Dave Wysochanski
2010-09-22 21:06 ` [PATCH 07/20] Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy Dave Wysochanski
2010-09-22 21:06 ` [PATCH 08/20] Add tags_format_and_copy() common function and call from _tags_disp Dave Wysochanski
2010-09-22 21:06 ` [PATCH 09/20] Add pv_tags_dup, vg_tags_dup, lv_tags_dup functions that call tags_format_and_copy Dave Wysochanski
2010-09-22 21:06 ` [PATCH 10/20] Add supporting functions vg_name_dup, vg_fmt_dup, vg_system_id_dup Dave Wysochanski
2010-09-22 21:06 ` [PATCH 11/20] Make generic GET_*_PROPERTY_FN macros and define secondary macro for vg, pv, lv Dave Wysochanski
2010-09-23 12:36 ` Zdenek Kabelac [this message]
2010-09-23 2:31 ` Dave Wysochanski
2010-09-22 21:06 ` [PATCH 12/20] Add 'get' functions for vg fields Dave Wysochanski
2010-09-22 21:06 ` [PATCH 13/20] Add lvm_vg_get_property() generic vg property function Dave Wysochanski
2010-09-22 21:06 ` [PATCH 14/20] Add tests for lvm_vg_get_property() Dave Wysochanski
2010-09-22 21:06 ` [PATCH 15/20] Add pv_mda_size, pv_mda_free, and pv_used functions, call from 'disp' functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 16/20] Add pv_name_dup() and pv_fmt_dup() helper functions Dave Wysochanski
2010-09-22 21:06 ` [PATCH 17/20] Add pv 'get' functions for all pv properties Dave Wysochanski
2010-09-22 21:06 ` [PATCH 18/20] Add pv_get_property and create generic internal _get_property function Dave Wysochanski
2010-09-22 21:06 ` [PATCH 19/20] Add lvm_pv_get_property() generic function to obtain value of any pv property Dave Wysochanski
2010-09-22 21:06 ` [PATCH 20/20] Add pv_get_property to interactive test Dave Wysochanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C9B49DA.3050402@redhat.com \
--to=zkabelac@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.