]> 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)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 22 Oct 2013 22:01:18 +0000 (23:01 +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 4800d1d1559a1e467666affbdc97b76ea3748803..2e58bf91bf11c65d32a9a69e690c460cb505841f 100644 (file)
@@ -7157,6 +7157,8 @@ libvirt_virDomainCreateWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *args
 
         if (libvirt_intUnwrap(pyfd, &fd) < 0)
             goto cleanup;
+
+        files[i] = fd;
     }
 
     LIBVIRT_BEGIN_ALLOW_THREADS;
@@ -7201,6 +7203,8 @@ libvirt_virDomainCreateXMLWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *a
 
         if (libvirt_intUnwrap(pyfd, &fd) < 0)
             goto cleanup;
+
+        files[i] = fd;
     }
 
     LIBVIRT_BEGIN_ALLOW_THREADS;