[libvirt] [PATCH] bhyve: implement domainGetOSType
Roman Bogorodskiy
bogorodskiy at gmail.com
Tue Oct 27 16:00:52 UTC 2015
Michal Privoznik wrote:
> On 20.10.2015 19:37, Roman Bogorodskiy wrote:
> > ---
> > src/bhyve/bhyve_driver.c | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> > index d44cf2c..efba0ae 100644
> > --- a/src/bhyve/bhyve_driver.c
> > +++ b/src/bhyve/bhyve_driver.c
> > @@ -465,6 +465,27 @@ bhyveDomainIsPersistent(virDomainPtr domain)
> > }
> >
> > static char *
> > +bhyveDomainGetOSType(virDomainPtr dom)
> > +{
> > + virDomainObjPtr vm;
> > + char *ret = NULL;
> > +
> > + if (!(vm = bhyveDomObjFromDomain(dom)))
> > + goto cleanup;
> > +
> > + if (virDomainGetOSTypeEnsureACL(dom->conn, vm->def) < 0)
> > + goto cleanup;
> > +
> > + if (VIR_STRDUP(ret, virDomainOSTypeToString(vm->def->os.type)) < 0)
> > + goto cleanup;
> > +
> > + cleanup:
> > + if (vm)
> > + virObjectUnlock(vm);
> > + return ret;
> > +}
> > +
> > +static char *
> > bhyveDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
> > {
> > virDomainObjPtr vm;
> > @@ -1487,6 +1508,7 @@ static virHypervisorDriver bhyveHypervisorDriver = {
> > .domainDefineXML = bhyveDomainDefineXML, /* 1.2.2 */
> > .domainDefineXMLFlags = bhyveDomainDefineXMLFlags, /* 1.2.12 */
> > .domainUndefine = bhyveDomainUndefine, /* 1.2.2 */
> > + .domainGetOSType = bhyveDomainGetOSType, /* 1.2.21 */
> > .domainGetXMLDesc = bhyveDomainGetXMLDesc, /* 1.2.2 */
> > .domainIsActive = bhyveDomainIsActive, /* 1.2.2 */
> > .domainIsPersistent = bhyveDomainIsPersistent, /* 1.2.2 */
> >
>
>
> ACK
Pushed, thanks!
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/20151027/a90af540/attachment-0001.sig>
More information about the libvir-list
mailing list