[libvirt] [PATCH 2/5] hyperv: Add driver skeleton

Eric Blake eblake at redhat.com
Wed Jul 13 20:52:16 UTC 2011


On 07/13/2011 01:01 PM, Matthias Bolte wrote:
> ---
>  cfg.mk                               |    1 +
>  include/libvirt/virterror.h          |    1 +
>  libvirt.spec.in                      |    9 +++

See patch 1/5 about this file.

>  po/POTFILES.in                       |    1 +
>  src/Makefile.am                      |   29 +++++++++
>  src/driver.h                         |    1 +
>  src/hyperv/hyperv_device_monitor.c   |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_device_monitor.h   |   29 +++++++++
>  src/hyperv/hyperv_driver.c           |  108 ++++++++++++++++++++++++++++++++++
>  src/hyperv/hyperv_driver.h           |   29 +++++++++
>  src/hyperv/hyperv_interface_driver.c |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_interface_driver.h |   29 +++++++++
>  src/hyperv/hyperv_network_driver.c   |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_network_driver.h   |   29 +++++++++
>  src/hyperv/hyperv_nwfilter_driver.c  |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_nwfilter_driver.h  |   29 +++++++++
>  src/hyperv/hyperv_private.h          |   34 +++++++++++
>  src/hyperv/hyperv_secret_driver.c    |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_secret_driver.h    |   29 +++++++++
>  src/hyperv/hyperv_storage_driver.c   |   79 +++++++++++++++++++++++++
>  src/hyperv/hyperv_storage_driver.h   |   29 +++++++++
>  src/libvirt.c                        |   12 ++++
>  src/util/virterror.c                 |    3 +

Quite a skeleton, but a lot of it should be fairly simple to review.

> +
> +static virDrvOpenStatus
> +hypervDeviceOpen(virConnectPtr conn,
> +                 virConnectAuthPtr auth ATTRIBUTE_UNUSED,
> +                 unsigned int flags)
> +{
> +    virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);

Yay - I don't have to rebase my flags patches to fix this.

> +
> +static virDeviceMonitor hypervDeviceMonitor = {
> +    "Hyper-V",
> +    .open = hypervDeviceOpen, /* 0.9.4 */
> +    .close = hypervDeviceClose, /* 0.9.4 */
> +};

Can't do much, but that's a reasonable first start.  :)

> +++ b/src/hyperv/hyperv_driver.h
> @@ -0,0 +1,29 @@
> +
> +/*
> + * hyperv_driver.h: core driver functions for managing Microsoft Hyper-V hosts
> + *
> + * Copyright (C) 2011 Matthias Bolte <matthias.bolte at googlemail.com>
> + * Copyright (C) 2009 Michael Sievers <msievers83 at googlemail.com>

How much of this file is really attributable to Michael, vs. this just
being copy and paste?

ACK with the copyright nit fixed.

-- 
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/20110713/8c1c178e/attachment-0001.sig>


More information about the libvir-list mailing list