[libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

Jim Meyering jim at meyering.net
Tue Feb 3 20:13:04 UTC 2009


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




More information about the libvir-list mailing list