]> git.ipfire.org Git - thirdparty/systemd.git/commit
Flagsify EscapeStyle and make ESCAPE_BACKSLASH_ONELINE implicit
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Mar 2021 12:35:40 +0000 (13:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 1 Apr 2021 10:46:24 +0000 (12:46 +0200)
commit9e53c10a0f64bc1ab70877c245d5a8e08c509575
treeea9f943a70e8b36df51d5d35e1ad79f549a067ef
parent679b0b0a21cbc14cc226c83ebe94ab2844340bc3
Flagsify EscapeStyle and make ESCAPE_BACKSLASH_ONELINE implicit

I want to tweak behaviour further, and that'll be easier when "style"
is converted to a bitfield.

Some callers used ESCAPE_BACKSLASH_ONELINE, and others not. But the
ones that didn't, simply didn't care, because the argument was assumed to
be one-line anyway (e.g. a service name). In environment-generator, this
could make a difference. But I think it's better to escape the newlines
there too. So newlines are now always escaped, to simplify the code and
the test matrix.
src/basic/escape.c
src/basic/escape.h
src/core/job.c
src/environment-d-generator/environment-d-generator.c
src/shared/bus-print-properties.c
src/shared/bus-wait-for-jobs.c
src/systemctl/systemctl-set-environment.c
src/test/test-escape.c