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/liblvm lvm.h lvm_vg.c Date: Thu, 23 Jul 2009 01:20:00 -0000 [thread overview] Message-ID: <20090723012023.22248.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2009-07-23 01:20:23 Modified files: liblvm : lvm.h lvm_vg.c Log message: Update lvm_vg_create to use NULL / non-NULL return for the time being. Some of the error interface is still TBD. Rather than exporting a lot of codes, etc, just use a simple pass / fail. The allows our unit test to not segfault if trying to create a VG that already exists. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/liblvm/lvm.h 2009/07/22 22:24:16 1.5 +++ LVM2/liblvm/lvm.h 2009/07/23 01:20:22 1.6 @@ -110,8 +110,7 @@ * \param libh * Handle obtained from lvm_create. * - * \return A VG handle with error code set appropriately. - * FIXME: Update error handling description after errno and logging patches + * \return non-NULL vg handle (success) or NULL (failure) */ vg_t *lvm_vg_create(lvm_t libh, const char *vg_name); --- LVM2/liblvm/lvm_vg.c 2009/07/22 22:24:16 1.3 +++ LVM2/liblvm/lvm_vg.c 2009/07/23 01:20:22 1.4 @@ -24,7 +24,15 @@ vg_t *lvm_vg_create(lvm_t libh, const char *vg_name) { - return vg_create((struct cmd_context *)libh, vg_name); + vg_t *vg; + + vg = vg_create((struct cmd_context *)libh, vg_name); + /* FIXME: error handling is still TBD */ + if (vg_read_error(vg)) { + vg_release(vg); + return NULL; + } + return vg; } int lvm_vg_extend(vg_t *vg, const char *device)
next reply other threads:[~2009-07-23 1:20 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-07-23 1:20 wysochanski [this message] 2009-07-26 1:54 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=20090723012023.22248.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).