Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and StandardError=, similar to the existing append:PATH. The code is mostly copied from the related append: code. Fixes #8983.
This commit is contained in:
committed by
Lennart Poettering
parent
e2ebc406ac
commit
8d7dab1fda
@@ -1144,6 +1144,9 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con
|
||||
} else if ((n = startswith(eq, "append:"))) {
|
||||
appended = strjoina(field, "FileToAppend");
|
||||
r = sd_bus_message_append(m, "(sv)", appended, "s", n);
|
||||
} else if ((n = startswith(eq, "truncate:"))) {
|
||||
appended = strjoina(field, "FileToTruncate");
|
||||
r = sd_bus_message_append(m, "(sv)", appended, "s", n);
|
||||
} else
|
||||
r = sd_bus_message_append(m, "(sv)", field, "s", eq);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user