[libvirt] [PATCHv11 1/6] libvirt/qemu - Centralize device modification in the more flexible APIs
Eric Blake
eblake at redhat.com
Thu Apr 21 19:19:29 UTC 2011
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 at redhat.com>'s work.
>
> From: Eric Blake <eblake at redhat.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu at 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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110421/a7499ff0/attachment-0001.sig>
More information about the libvir-list
mailing list