public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata vg.c vg.h Date: Thu, 30 Sep 2010 14:08:00 -0000 [thread overview] Message-ID: <20100930140834.17677.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2010-09-30 14:08:33 Modified files: lib/metadata : vg.c vg.h Log message: Add supporting functions vg_name_dup, vg_fmt_dup, vg_system_id_dup. Add supporting functions for vg_name, vg_fmt, vg_system_id. Append "_dup" to end of supporting functions to make clear the strings are dup'd and to avoid namespace conflict with vg_name. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/vg.c.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/vg.h.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/lib/metadata/vg.c 2010/09/30 14:08:20 1.5 +++ LVM2/lib/metadata/vg.c 2010/09/30 14:08:33 1.6 @@ -16,6 +16,23 @@ #include "metadata.h" #include "activate.h" +char *vg_fmt_dup(const struct volume_group *vg) +{ + if (!vg->fid || !vg->fid->fmt) + return NULL; + return dm_pool_strdup(vg->vgmem, vg->fid->fmt->name); +} + +char *vg_name_dup(const struct volume_group *vg) +{ + return dm_pool_strdup(vg->vgmem, vg->name); +} + +char *vg_system_id_dup(const struct volume_group *vg) +{ + return dm_pool_strdup(vg->vgmem, vg->system_id); +} + char *vg_uuid_dup(const struct volume_group *vg) { return id_format_and_copy(vg->vgmem, &vg->id); --- LVM2/lib/metadata/vg.h 2010/09/30 14:08:20 1.4 +++ LVM2/lib/metadata/vg.h 2010/09/30 14:08:33 1.5 @@ -93,6 +93,9 @@ uint32_t mda_copies; /* target number of mdas for this VG */ }; +char *vg_fmt_dup(const struct volume_group *vg); +char *vg_name_dup(const struct volume_group *vg); +char *vg_system_id_dup(const struct volume_group *vg); uint32_t vg_seqno(const struct volume_group *vg); uint64_t vg_status(const struct volume_group *vg); int vg_set_alloc_policy(struct volume_group *vg, alloc_policy_t alloc);
reply other threads:[~2010-09-30 14:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100930140834.17677.qmail@sourceware.org \ --to=wysochanski@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).