Re: [PATCH] qemu: Simplify the codes

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

 



On 12/04/2012 10:29 AM, Osier Yang wrote:

s/codes/code/ in the subject

> "disk" is initialized to "dev->data.disk" in the beginning of the
> function.
> ---
>  src/qemu/qemu_driver.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

ACK.

> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 2c36935..a7ef4a2 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6154,9 +6154,8 @@ qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
>      case VIR_DOMAIN_DISK_DEVICE_LUN:
>          if (disk->bus == VIR_DOMAIN_DISK_BUS_VIRTIO)
>              ret = qemuDomainDetachPciDiskDevice(driver, vm, dev);
> -        else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI)
> -            ret = qemuDomainDetachDiskDevice(driver, vm, dev);
> -        else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB)
> +        else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI ||
> +                 disk->bus == VIR_DOMAIN_DISK_BUS_USB)
>              ret = qemuDomainDetachDiskDevice(driver, vm, dev);
>          else
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]