From: Andy Grover <grover@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - python-lvm: Make second lv.snapshot() argument optional
Date: Fri, 14 Dec 2012 22:11:08 +0000 (UTC) [thread overview]
Message-ID: <20121214221108.E6D52137F@hosted02.fedoraproject.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0958905b1bc0a59d34a4092377bae7c59f424181
Commit: 0958905b1bc0a59d34a4092377bae7c59f424181
Parent: 0e3093979e901384aecb22e08d83b5acb2ef12c1
Author: Andy Grover <agrover@redhat.com>
AuthorDate: Fri Dec 14 14:10:41 2012 -0800
Committer: Andy Grover <agrover@redhat.com>
CommitterDate: Fri Dec 14 14:10:41 2012 -0800
python-lvm: Make second lv.snapshot() argument optional
If no size is given, size defaults to 0, which in lvm_lv_snapshot will
allocate extents equal to the original LV be allocated for the new
snapshot.
Signed-off-by: Andy Grover <agrover@redhat.com>
---
python/liblvm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/liblvm.c b/python/liblvm.c
index 906825e..4db507c 100644
--- a/python/liblvm.c
+++ b/python/liblvm.c
@@ -1317,12 +1317,12 @@ static PyObject *
liblvm_lvm_lv_snapshot(lvobject *self, PyObject *args)
{
const char *vgname;
- uint64_t size;
+ uint64_t size = 0;
lvobject *lvobj;
LV_VALID(self);
- if (!PyArg_ParseTuple(args, "sl", &vgname, &size)) {
+ if (!PyArg_ParseTuple(args, "s|l", &vgname, &size)) {
return NULL;
}
next reply other threads:[~2012-12-14 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 22:11 Andy Grover [this message]
2012-12-15 21:34 ` master - python-lvm: Make second lv.snapshot() argument optional Zdenek Kabelac
2012-12-16 2:27 ` Andy Grover
2012-12-16 18:58 ` Zdenek Kabelac
2012-12-17 14:51 ` Tony Asleson
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=20121214221108.E6D52137F@hosted02.fedoraproject.org \
--to=grover@fedoraproject.org \
--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.