[libvirt] [PATCH] bhyve: implement virConnectGetType
Roman Bogorodskiy
bogorodskiy at gmail.com
Fri May 13 18:13:41 UTC 2016
Fabian Freyer wrote:
> This implements virConnectGetType for the bhyve driver.
>
> ---
> src/bhyve/bhyve_driver.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> index 4fc504e..a853e94 100644
> --- a/src/bhyve/bhyve_driver.c
> +++ b/src/bhyve/bhyve_driver.c
> @@ -1508,6 +1508,15 @@ bhyveDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
> return ret;
> }
>
> +static const char *
> +bhyveConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
ATTRIBUTE_UNUSED is not needed here.
> +{
> + if (virConnectGetTypeEnsureACL(conn) < 0)
> + return NULL;
> +
> + return "BHYVE";
> +}
> +
> static virHypervisorDriver bhyveHypervisorDriver = {
> .name = "bhyve",
> .connectOpen = bhyveConnectOpen, /* 1.2.2 */
> @@ -1557,6 +1566,7 @@ static virHypervisorDriver bhyveHypervisorDriver = {
> .connectDomainEventRegisterAny = bhyveConnectDomainEventRegisterAny, /* 1.2.5 */
> .connectDomainEventDeregisterAny = bhyveConnectDomainEventDeregisterAny, /* 1.2.5 */
> .domainHasManagedSaveImage = bhyveDomainHasManagedSaveImage, /* 1.2.13 */
> + .connectGetType = bhyveConnectGetType, /* 1.3.5 */
> };
>
ACK and pushed with ATTRIBUTE_UNUSED removed.
Congrats on the first patch!
Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160513/22bf5155/attachment-0001.sig>
More information about the libvir-list
mailing list