Re: [PATCH] virconf: properly set the end of content

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

 



On 11/08/2017 01:56 AM, Daniel P. Berrange wrote:
On Tue, Nov 07, 2017 at 03:37:46PM -0700, Jim Fehlig wrote:
There was a recent report of the xen-xl converter not handling
config files missing an ending newline

https://www.redhat.com/archives/libvir-list/2017-October/msg01353.html

Commit 3cc2a9e0 fixed a similar problem when parsing content of a
file but missed parsing in-memory content. But AFAICT, the better
fix is to properly set the end of the content when initializing the
virConfParserCtxt in virConfParse().

This commit reverts the part of 3cc2a9e0 that appends a newline to
files missing it, and fixes setting the end of content when
initializing virConfParserCtxt.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
  src/util/virconf.c | 13 ++-----------
  1 file changed, 2 insertions(+), 11 deletions(-)

Could you try to extend  tests/virconftest.c to cover in-memory
content for this newline scenario too.

I cooked up some content that failed without this change and passes with it. V2 sent

https://www.redhat.com/archives/libvir-list/2017-November/msg00340.html

Regards,
Jim

--
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]
  Powered by Linux