On Fri, Mar 04, 2011 at 11:33:16AM +0000, Daniel P. Berrange wrote:
> On Fri, Mar 04, 2011 at 06:30:56PM +0800, Daniel Veillard wrote:
> > 
> > virLogEmergencyDumpAll() allows to dump the content of the
> > debug buffer from within a signal handler. It saves to all
> > log file or stderr if none is found
> > * src/util/logging.h src/util/logging.c: add the new API
> >   and cleanup the old virLogDump code
> > * src/libvirt_private.syms: exports it as a private symbol
> > 
> > Signed-off-by: Daniel Veillard <[email protected]>
> > ---
> >  src/libvirt_private.syms |    1 +
> >  src/util/logging.c       |   87 
> > +++++++++++++++++++++++++++------------------
> >  src/util/logging.h       |    2 +-
> >  3 files changed, 54 insertions(+), 36 deletions(-)
> 
> ACK with one small fix....
> 
> > +static void virLogDumpAllFD(const char *msg, int len) {
> > +    int i, found = 0;
> > +
> > +    for (i = 0; i < virLogNbOutputs;i++) {
> > +        if (virLogOutputs[i].f == virLogOutputToFd) {
> > +            int fd = (long) virLogOutputs[i].data;
> > +
> > +            if (fd >= 0)
> > +                ignore_value (safewrite(fd, msg, len));
> 
> Need to be:
> 
>             if (fd >= 0) {
>                 ignore_value (safewrite(fd, msg, len));
>                 found = 1;
>             }

  Oops, right :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
[email protected]  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to