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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> 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)

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]