Re: [PATCH v2 3/3] iohelper: Don't include newlines in error messages

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

 



On Tue, 2019-02-19 at 09:00 -0500, John Ferlan wrote:
> Anyway, see commit b29e08db... I think a case could be made in the
> commit message ;-) that prior to that commit the '\n' was (properly) at
> the end, but with that commit message the '\n' was perhaps put in the
> wrong place.

Yeah, looking at that commit it's pretty obvious that the \n ended
up in the middle of the string rather than at the end of it by
mistake.

> So maybe this changes to move the '\n' to after the formatted message.
> Of course that means perhaps an extra blank line for most outputs.

Since libvirt_iohelper is really only intended to be called from
libvirt itself, and whatever it outputs will ultimately end up as
an argument to either VIR_WARN() or virReportError(), I think it
makes complete sense for error messages to *not* end with a newline.

In fact, all but two strings in the program contain \n after this
change. I'll post a separate patch that gets rid of those too.

-- 
Andrea Bolognani / Red Hat / Virtualization


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

  Powered by Linux