On Wed, Nov 08, 2017 at 04:01:48PM -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. A test is also added to check > parsing in-memory content missing an ending newline. > > Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx> > --- > src/util/virconf.c | 13 ++-------- > tests/virconftest.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 71 insertions(+), 11 deletions(-) Reviewed-by: Daniel P. Berrange <berrange@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list