[libvirt] [PATCHv2] bhyve: domainCreateXML

Roman Bogorodskiy bogorodskiy at gmail.com
Fri Apr 11 16:53:32 UTC 2014


  Roman Bogorodskiy wrote:

> > +    dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
> > +    if (!dom)
> > +        goto cleanup;
> > +
> > +    ret = virBhyveProcessStart(dom->conn, privconn, vm,
> > +                               VIR_DOMAIN_RUNNING_BOOTED,
> > +                               start_flags);
> > +    if (ret) {
> > +        virObjectUnref(dom);
> > +        dom = NULL;
> I think we could simplify the logic a little by calling
> virBhyveProcessStart() after this block, right before

Err, virGetDomain(), not virBhyveProcessStart().

> dom->id = vm->def->id; line. In that case we don't have to jump to
> cleanup and do that cleanup in if (ret) block as well.
> 
> I'm going to push that with my comments squashed in, if no objections.

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140411/25dc1b2f/attachment-0001.sig>


More information about the libvir-list mailing list