[Libvir] PATCH: More useful error messages with missing certs

Daniel Veillard veillard at redhat.com
Thu Jul 12 15:08:16 UTC 2007


On Thu, Jul 12, 2007 at 03:59:57PM +0100, Daniel P. Berrange wrote:
> On Wed, Jul 11, 2007 at 04:10:10PM -0400, Daniel Veillard wrote:
> > > +#define CHECK_CERT(type, file) \
> > > +    do { if (stat(file, &sb) < 0) {                                      \
> > > +            qemudLog (QEMUD_ERR, "Cannot access " type " '%s': %s (%d)", \
> > > +                         file, strerror(errno), errno); \
> > > +            return -1;                                  \
> > > +        } } while (0)
> > > +
> > 
> >  Why not make a function instead of this convoluted construct ?
> > And same in src/remote_internal.c too.
> 
> I committed with that suggested change - the compiler will probably
> inline the function anyway.

  Thanks :-)

Daniel

-- 
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