[libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead
Daniel P. Berrange
berrange at redhat.com
Tue Feb 3 21:37:19 UTC 2009
On Tue, Feb 03, 2009 at 09:13:04PM +0100, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange at redhat.com> wrote:
> ...
> >> @@ -877,8 +865,7 @@ static int qemudWaitForMonitor(virConnectPtr conn,
> >> qemudFindCharDevicePTYs,
> >> "console", 3000);
> >> if (close(logfd) < 0)
> >> - qemudLog(QEMUD_WARN, _("Unable to close logfile: %s\n"),
> >> - strerror(errno));
> >> + virReportSystemError(NULL, errno, "%s", _("Unable to close logfile"));
> >
> > This is not fatal to starting the VM, so should raise an
> > error here. Could argue we shoud raise the log level to
> > QEMUD_ERROR though.
>
> FYI, whether we use QEMUD_ERROR or QEMUD_WARN doesn't really
> matter, since that parameter is ignored by the qemudLog macro:
>
> #define qemudLog(level, msg...) fprintf(stderr, msg)
Oh, I thought DV had already switched this macro over to using the
definitions from src/logging.h, which does pay attention to "level" arg.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list