• C
    virconf: Handle conf file without ending newline · 3cc2a9e0
    Cole Robinson 提交于
    $ echo -n 'log_level=1' > ~/.config/libvirt/libvirtd.conf
    $ libvirtd --timeout=10
    2014-10-10 10:30:56.394+0000: 6626: info : libvirt version: 1.1.3.6, package: 1.fc20 (Fedora Project, 2014-09-08-17:50:42, buildvm-05.phx2.fedoraproject.org)
    2014-10-10 10:30:56.394+0000: 6626: error : main:1261 : Can't load config file: configuration file syntax error: /home/rjones/.config/libvirt/libvirtd.conf:1: expecting a value: /home/rjones/.config/libvirt/libvirtd.conf
    
    Rather than try to fix this in the depths of the parser, just catch
    the case when a config file doesn't end in a newline, and manually
    append a newline to the content before parsing
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1151409
    3cc2a9e0
cfg.mk 47.3 KB