Re: [PATCH v2 1/8] qemu: Separate char device removal into a standalone function

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

 



On Thu, Jul 18, 2013 at 12:03:43PM +0200, Jiri Denemark wrote:
> ---
> 
> Notes:
>     Version 2:
>     - new patch
> 
>  src/qemu/qemu_hotplug.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index 788ad47..f2dddc8 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -2475,6 +2475,19 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver,
>  }
>  
>  
> +static void
> +qemuDomainRemoveChrDevice(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
> +                          virDomainObjPtr vm,
> +                          virDomainChrDefPtr chr)
> +{
> +    VIR_DEBUG("Removing character device %s from domain %p %s",
> +              chr->info.alias, vm, vm->def->name);
> +
> +    qemuDomainChrRemove(vm->def, chr);
> +    virDomainChrDefFree(chr);
> +}
> +
> +
>  int qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
>                                       virDomainObjPtr vm,
>                                       virDomainDiskDefPtr detach)
> @@ -3172,8 +3185,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
>      }
>      qemuDomainObjExitMonitor(driver, vm);
>  
> -    qemuDomainChrRemove(vmdef, tmpChr);
> -    virDomainChrDefFree(tmpChr);
> +    qemuDomainRemoveChrDevice(driver, vm, tmpChr);
>      ret = 0;
>  
>  cleanup:

ACK


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]