]> git.ipfire.org Git - thirdparty/kmod.git/commit
shared: Fix EOF handling in freadline_wrapped
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 27 Sep 2024 19:52:27 +0000 (21:52 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 28 Sep 2024 04:17:38 +0000 (23:17 -0500)
commit7805c95fbe703bff3d113bfedd5d607cf5da9444
tree2f19ce0943eb1c5b8c0d642f7fbd6ec6ff3a190d
parent82062d275dc6a29f35b96eaa1c0eff9b1d3db9f3
shared: Fix EOF handling in freadline_wrapped

If a file ends with a backslash without a newline, freadline_wrapped
adds EOF to the actual string.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/159
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
shared/util.c
testsuite/rootfs-pristine/test-util/freadline_wrapped-correct.txt
testsuite/rootfs-pristine/test-util/freadline_wrapped-input.txt