On 12/16/2010 09:50 AM, Daniel P. Berrange wrote:
> The QEMU driver file is far too large. Move all the hotplug
> helper code out into a separate file. No functional change.
> 
> * src/qemu/qemu_hotplug.c, src/qemu/qemu_hotplug.h,
>   src/Makefile.am: Add hotplug helper file
> * src/qemu/qemu_driver.c: Delete hotplug code
> ---
>  src/Makefile.am         |    1 +
>  src/qemu/qemu_driver.c  | 2019 ++++------------------------------------------
>  src/qemu/qemu_hotplug.c | 1711 +++++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_hotplug.h |  103 +++
>  4 files changed, 1991 insertions(+), 1843 deletions(-)
>  create mode 100644 src/qemu/qemu_hotplug.c
>  create mode 100644 src/qemu/qemu_hotplug.h


> -static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
> -                                           virDomainObjPtr vm,
> -                                           virDomainDeviceDefPtr dev,
> -                                           unsigned long long qemuCmdFlags)
> +static int qemudDomainAttachDevice(virDomainPtr dom,
> +                                   const char *xml)
>  {
> -    int i, ret = -1;
> -    virDomainDiskDefPtr detach = NULL;
> -    qemuDomainObjPrivatePtr priv = vm->privateData;
> +    struct qemud_driver *driver = dom->conn->privateData;
> +    virDomainObjPtr vm;
> +    virDomainDeviceDefPtr dev = NULL;
> +    unsigned long long qemuCmdFlags;

Oh gross. git botched that diff, making this area of the patch harder to
review than any of the prior patches.  (Possibly because of the renames
from qemud to qemu?).  But even with that munging, the overall result
looks good to me.


> +int qemudDomainAttachHostDevice(struct qemud_driver *driver,
> +                                virDomainObjPtr vm,
> +                                virDomainHostdevDefPtr hostdev,
> +                                unsigned long long qemuCmdFlags);
> +int qemuDomainChangeGraphics(struct qemud_driver *driver,
> +                             virDomainObjPtr vm,
> +                             virDomainGraphicsDefPtr dev);

So, given that some, but not all, of the functions in this file start
with qemudDomain, should we change them to all be qemuDomain?  Or maybe
separate the move and the rename into two separate patches, so that git
diff won't botch it so badly?

At any rate, ACK.

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

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to