On Thu, Dec 23, 2010 at 09:57:15AM -0700, Eric Blake wrote: > On 12/23/2010 06:53 AM, Osier Yang wrote: > > Add VM name/UUID in log for domain related APIs. > > Format: "param0=%p, param1=%p, (VM: %s)" > > > > * src/libvirt.c > > --- > > src/libvirt.c | 294 +++++++++++++++++++++++++++++++++++++++++++-------------- > > 1 files changed, 221 insertions(+), 73 deletions(-) > > > > diff --git a/src/libvirt.c b/src/libvirt.c > > index ee2495a..03dcafc 100644 > > --- a/src/libvirt.c > > +++ b/src/libvirt.c > > @@ -1961,7 +1961,9 @@ error: > > virConnectPtr > > virDomainGetConnect (virDomainPtr dom) > > { > > - DEBUG("dom=%p", dom); > > + const char *name = virDomainGetName(dom); > > + > > + DEBUG("dom=%p, (VM: %s)", dom, name); > > virDomainGetName() can return NULL, so you'd need to use NULLSTR(name) > everywhere. That alone requires a v2, but I'd wait for feedback from > danpb or DV as to whether this makes sense. Whether what makes sense? Dave -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list