summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-03-03 13:35:40 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-01 12:46:24 +0200
commit9e53c10a0f64bc1ab70877c245d5a8e08c509575 (patch)
treeea9f943a70e8b36df51d5d35e1ad79f549a067ef /src/systemctl
parent679b0b0a21cbc14cc226c83ebe94ab2844340bc3 (diff)
downloadsystemd-9e53c10a0f64bc1ab70877c245d5a8e08c509575.tar.gz
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.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-set-environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-set-environment.c b/src/systemctl/systemctl-set-environment.c
index bfd87c0cdd..a19e031dd3 100644
--- a/src/systemctl/systemctl-set-environment.c
+++ b/src/systemctl/systemctl-set-environment.c
@@ -17,7 +17,7 @@ static int print_variable(const char *s) {
return log_error_errno(SYNTHETIC_ERRNO(EUCLEAN),
"Invalid environment block");
- esc = shell_maybe_quote(sep + 1, ESCAPE_POSIX);
+ esc = shell_maybe_quote(sep + 1, SHELL_ESCAPE_POSIX);
if (!esc)
return log_oom();