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

Re: [libvirt] [PATCHv11 1/6] libvirt/qemu - Centralize device modification in the more flexible APIs



On 04/21/2011 01:22 AM, KAMEZAWA Hiroyuki wrote:
> 
> Centralize device modification in the more flexible APIs, to allow future
> honoring of additional flags.  Explicitly reject the 
> VIR_DOMAIN_DEVICE_MODIFY_FORCE flag on attach/detach.
> 
> Based on Eric Blake<eblake redhat com>'s work.
> 
> From: Eric Blake <eblake redhat com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa hiroyu jp fujitsu com>
> 
> * src/qemu/qemu_driver.c
> (qemudDomainAttachDevice)(qemudDomainAttachDeviceFlags): Swap bodies,rename...

Where's the rename?

> (qemudDomainDetachDevice, qemudDomainDetachDeviceFlags): Likewise.
> ---
>  src/qemu/qemu_driver.c |   53 ++++++++++++++++++++++++++---------------------
>  1 files changed, 29 insertions(+), 24 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index f6e503a..a8f3849 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -3786,8 +3786,8 @@ cleanup:
>  }
>  
>  
> -static int qemudDomainAttachDevice(virDomainPtr dom,
> -                                   const char *xml)
> +static int qemudDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
> +                                        unsigned int flags)

I adjusted this to do s/qemud/qemu/ for the lines of code actually
touched in this patch, plus fallout.

ACK and pushed with this squashed in.

diff --git c/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c
index a8f3849..1f5a899 100644
--- c/src/qemu/qemu_driver.c
+++ w/src/qemu/qemu_driver.c
@@ -3786,8 +3786,8 @@ cleanup:
 }


-static int qemudDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
-                                        unsigned int flags)
+static int qemuDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
+                                       unsigned int flags)
 {
     struct qemud_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -3951,10 +3951,10 @@ cleanup:
     return ret;
 }

-static int qemudDomainAttachDevice(virDomainPtr dom, const char *xml)
+static int qemuDomainAttachDevice(virDomainPtr dom, const char *xml)
 {
-    return qemudDomainAttachDeviceFlags(dom, xml,
-                                        VIR_DOMAIN_DEVICE_MODIFY_LIVE);
+    return qemuDomainAttachDeviceFlags(dom, xml,
+                                       VIR_DOMAIN_DEVICE_MODIFY_LIVE);
 }


@@ -4080,8 +4080,8 @@ cleanup:
 }


-static int qemudDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
-                                        unsigned int flags)
+static int qemuDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
+                                       unsigned int flags)
 {
     struct qemud_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -4175,10 +4175,10 @@ cleanup:
     return ret;
 }

-static int qemudDomainDetachDevice(virDomainPtr dom, const char *xml)
+static int qemuDomainDetachDevice(virDomainPtr dom, const char *xml)
 {
-    return qemudDomainDetachDeviceFlags(dom, xml,
-                                        VIR_DOMAIN_DEVICE_MODIFY_LIVE);
+    return qemuDomainDetachDeviceFlags(dom, xml,
+                                       VIR_DOMAIN_DEVICE_MODIFY_LIVE);
 }

 static int qemudDomainGetAutostart(virDomainPtr dom,
@@ -6980,10 +6980,10 @@ static virDriver qemuDriver = {
     qemudDomainStartWithFlags, /* domainCreateWithFlags */
     qemudDomainDefine, /* domainDefineXML */
     qemudDomainUndefine, /* domainUndefine */
-    qemudDomainAttachDevice, /* domainAttachDevice */
-    qemudDomainAttachDeviceFlags, /* domainAttachDeviceFlags */
-    qemudDomainDetachDevice, /* domainDetachDevice */
-    qemudDomainDetachDeviceFlags, /* domainDetachDeviceFlags */
+    qemuDomainAttachDevice, /* domainAttachDevice */
+    qemuDomainAttachDeviceFlags, /* domainAttachDeviceFlags */
+    qemuDomainDetachDevice, /* domainDetachDevice */
+    qemuDomainDetachDeviceFlags, /* domainDetachDeviceFlags */
     qemuDomainUpdateDeviceFlags, /* domainUpdateDeviceFlags */
     qemudDomainGetAutostart, /* domainGetAutostart */
     qemudDomainSetAutostart, /* domainSetAutostart */


-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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