summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c16
1 files changed, 4 insertions, 12 deletions
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;
}