All of lore.kernel.org
 help / color / mirror / Atom feed
* master - python-lvm: Make second lv.snapshot() argument optional
@ 2012-12-14 22:11 Andy Grover
  2012-12-15 21:34 ` Zdenek Kabelac
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Grover @ 2012-12-14 22:11 UTC (permalink / raw)
  To: lvm-devel

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;
 	}
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-17 14:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 22:11 master - python-lvm: Make second lv.snapshot() argument optional Andy Grover
2012-12-15 21:34 ` Zdenek Kabelac
2012-12-16  2:27   ` Andy Grover
2012-12-16 18:58     ` Zdenek Kabelac
2012-12-17 14:51   ` Tony Asleson

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.