]> git.ipfire.org Git - thirdparty/systemd.git/commit
conf-parser: accept trailing backslash at the end of the file (#8941)
authorFilipe Brandenburger <filbranden@google.com>
Thu, 10 May 2018 01:10:07 +0000 (18:10 -0700)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 May 2018 01:10:07 +0000 (18:10 -0700)
commit4f29e0db127dce9e1a28af4d7bf88c124ba257b7
tree2fd7c169e398b3b3c33f417c490892ff0bb1d013
parent3eff246a17c0674389079c84cfb852f4315aa2fc
conf-parser: accept trailing backslash at the end of the file (#8941)

This makes it behave the same whether there is a blank line or not at
the end of the file.  This is also consistent with the behavior of the
shell on a shell script that ends on a trailing backslash at the last
line.

Added tests to test_config_parse(), which only pass if the corresponding
change to config_parse() is included.
src/shared/conf-parser.c
src/test/test-conf-parser.c