]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
python: Fix Create*WithFiles filefd passing
authorMarian Neagul <marian@info.uvt.ro>
Tue, 22 Oct 2013 15:03:39 +0000 (16:03 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 23 Oct 2013 08:54:06 +0000 (09:54 +0100)
Commit d76227be added functions virDomainCreateWithFiles and
virDomainCreateXMLWithFiles, but there was a little piece missing in
python bindings.  This patch fixes proper passing of file descriptors
in the overwrites of these functions.

python/libvirt-override.c

index d16b9a2f9627debf624825d2e6c77bdab2a00219..273ea3880f282adcf9344fbc39c2bd3478adf5fa 100644 (file)
@@ -7105,6 +7105,8 @@ libvirt_virDomainCreateWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *args
 
         if (libvirt_intUnwrap(pyfd, &fd) < 0)
             goto cleanup;
+
+        files[i] = fd;
     }
 
     LIBVIRT_BEGIN_ALLOW_THREADS;
@@ -7149,6 +7151,8 @@ libvirt_virDomainCreateXMLWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *a
 
         if (libvirt_intUnwrap(pyfd, &fd) < 0)
             goto cleanup;
+
+        files[i] = fd;
     }
 
     LIBVIRT_BEGIN_ALLOW_THREADS;