mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
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>
This commit is contained in:
parent
0e3093979e
commit
0958905b1b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user