diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/dbus-execute.c | 2 | ||||
-rw-r--r-- | src/core/load-fragment.c | 16 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index b3fc0ff5c3..9960b7a811 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -1671,7 +1671,7 @@ int bus_exec_context_set_transient_property( if (mode != UNIT_CHECK) { c->mount_flags = flags; - unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, strempty(mount_propagation_flags_to_string(flags))); + unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, mount_propagation_flags_to_string(flags)); } return 1; diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index f325d853c6..bc0cf73d39 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1278,25 +1278,17 @@ int config_parse_exec_mount_flags( void *userdata) { - unsigned long flags; ExecContext *c = data; + int r; assert(filename); assert(lvalue); assert(rvalue); assert(data); - if (isempty(rvalue)) - flags = 0; - else { - flags = mount_propagation_flags_from_string(rvalue); - if (flags == 0) { - log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse mount flag %s, ignoring.", rvalue); - return 0; - } - } - - c->mount_flags = flags; + r = mount_propagation_flags_from_string(rvalue, &c->mount_flags); + if (r < 0) + log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse mount flag %s, ignoring.", rvalue); return 0; } |