[lvm-devel] [PATCH 05/12] Add lvm_pv_name, lvm_vg_name, and lvm_lv_name accessors.

Alasdair G Kergon agk at redhat.com
Sun Feb 22 23:00:45 UTC 2009


On Thu, Feb 12, 2009 at 02:30:34PM -0500, Dave Wysochanski wrote:
> RFC - liblvm could provide accessor functions such as these along with
> the generic attribute functions.  These specific accessor functions will
> make application code simpler and more readable and may be desired by
> application programmers over the generic attribute functions for single
> attributes.
 
> +/*
> + * PV, VG, and LV object attribute functions.
> + */
> +const char *lvm_pv_name(const pv_t *pv);
> +const char *lvm_vg_name(const vg_t *vg);
> +const char *lvm_lv_name(const lv_t *lv);

Maybe, but let's see how the rest of the interface looks.
There are several ways this could be done, including generating
parts of the interface from templates or using the preprocessor
to offer a clean interface to underlying generic functions.

Alasdair
-- 
agk at redhat.com




More information about the lvm-devel mailing list