From 541abb79fe046a69c7a9970259363ea7fabaa916 Mon Sep 17 00:00:00 2001
Message-Id: <541abb79fe046a69c7a9970259363ea7fabaa916@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Wed, 22 Oct 2014 11:48:58 +0200
Subject: [PATCH] flags cannot get right value for blockCopy function
When use blockCopy, flags cannot get a right value, because
PyArg_ParseTuple want to get 6 parameters and blockCopy only
pass 5. Flags will get a unpredictable value, this will make
the function fail with error:
unsupported flags (0x7f6c) in function qemuDomainBlockCopy
Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit a7303a56b5e55c29cb5336c84a89b8347a355770)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1155484
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Conflicts:
libvirt-override.c: commit 7aaa02b4 updated formatting string so
follow the new format in this backport
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
libvirt-override.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index e072602..1aa3bf2 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -8108,9 +8108,8 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
unsigned int flags;
int c_retval;
- if (!PyArg_ParseTuple(args, (char *) "Ozz|Oi:virDomainBlockCopy",
- &pyobj_dom, &disk, &destxml, &pyobj_dict, ¶ms,
- &flags))
+ if (!PyArg_ParseTuple(args, (char *) "Ozz|OI:virDomainBlockCopy",
+ &pyobj_dom, &disk, &destxml, &pyobj_dict, &flags))
return VIR_PY_INT_FAIL;
if (PyDict_Check(pyobj_dict)) {
--
2.1.3