[libvirt] [PATCH 3/3] networking API for hostonly networks in VirtualBox driver in libvirt
Pritesh Kothari
Pritesh.Kothari at Sun.COM
Mon May 11 11:42:54 UTC 2009
> > +
> > + strcpy (networkNameUtf8, "HostInterfaceNetworking-");
> > + strcat (networkNameUtf8, def->name);
>
> That said, how about just using virAsprintf(&nmetworkNameUtf8..
> instead of alloc+strcpy
Done.
> > + DEBUG("Network Name: %s", def->name);
> > + DEBUG("Network UUID: "
> > + "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
> > + (unsigned)iid->m0, (unsigned)iid->m1,
> > + (unsigned)iid->m2, (unsigned)iid->m3[0],
> > + (unsigned)iid->m3[1], (unsigned)iid->m3[2],
> > + (unsigned)iid->m3[3], (unsigned)iid->m3[4],
> > + (unsigned)iid->m3[5], (unsigned)iid->m3[6],
> > + (unsigned)iid->m3[7]);
> This is rather overkill, since we already log the entire XML document
> passed into the public API which has all this info
just keeping the above two because atleast the debug logs should show the UUID
user wants to set and the one which we have, the reason being the default
hostonly adaptor in VirtualBox 2.2.* is created while install and can't be
changed.
> > +
> > + strcpy (networkNameUtf8, "HostInterfaceNetworking-");
> > + strcat (networkNameUtf8, def->name);
>
> Same note here, as before, and is most other methods that follow
Done.
Will post a patch soon with other changes suggested on the list.
Regards,
Pritesh
More information about the libvir-list
mailing list