Re: [PATCH] python: Fix Create*WithFiles filefd passing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 22, 2013 at 04:21:44PM +0100, Martin Kletzander wrote:
> From: Marian Neagul <marian@xxxxxxxxxxx>
> 
> 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.
> 
> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
> 
> Notes:
>     I checked that Marian's patch works as expected and that it really
>     fixes the issue.
> 
>  python/libvirt-override.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/python/libvirt-override.c b/python/libvirt-override.c
> index 4800d1d..2e58bf9 100644
> --- a/python/libvirt-override.c
> +++ b/python/libvirt-override.c
> @@ -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;

ACK, that's an embarassing bug!

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]