[Libvir] PATCH 2/4: Xen driver support for serial/paralle

Daniel Veillard veillard at redhat.com
Fri Apr 25 07:11:44 UTC 2008

On Thu, Apr 24, 2008 at 10:14:49PM +0100, Daniel P. Berrange wrote:
> On Thu, Apr 24, 2008 at 10:42:34PM +0200, Jim Meyering wrote:
> > All of the virBufferAddLit and virBufferVSprintf calls
> > above can fail with ENOMEM.  I see that there are *many* more
> > virBufferAddLit and virBufferVSprintf calls that ignore their
> > return values (over 300), so maybe I'm missing something.
> Yes, the entire set of Xen drivers is basically fubar wrt to checking
> virBufferXXX return values. I felt that needed addresing independantly
> changing everything in one go, so didn't try to address that in this
> patch.

  Maybe the best is to store in the buffer the fact that there have been
an error at some point, and check that value before extracting the content
in a single place, that would make the code cleaner, and makes harder to
miss one test.


Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

More information about the libvir-list mailing list