summaryrefslogtreecommitdiff
path: root/src/shared/bus-util.c
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2015-10-11 03:37:50 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2015-10-14 14:48:45 +0000
commita8a1357560aa6b2618dfe65674c9c9179940ef88 (patch)
tree736d3a9234b549aad0c436957225f2ea1bbf41be /src/shared/bus-util.c
parent9ea79b459edef51e3ccc1ddde07c7b1399bed601 (diff)
systemd-run: can launch units with SyslogLevel
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r--src/shared/bus-util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 65922dd93b..bf9320b0e0 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1497,7 +1497,18 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
"RootDirectory", "SyslogIdentifier"))
r = sd_bus_message_append(m, "v", "s", eq);
- else if (streq(field, "DeviceAllow")) {
+ else if (streq(field, "SyslogLevel")) {
+ int level;
+
+ level = log_level_from_string(eq);
+ if (level < 0) {
+ log_error("Failed to parse %s value %s.", field, eq);
+ return -EINVAL;
+ }
+
+ r = sd_bus_message_append(m, "v", "i", level);
+
+ } else if (streq(field, "DeviceAllow")) {
if (isempty(eq))
r = sd_bus_message_append(m, "v", "a(ss)", 0);