diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-15 19:41:39 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-17 21:08:47 +0100 |
commit | c3470872c6c12d64c895643bd3b02022beb0589e (patch) | |
tree | bb46f589f8e8dd983e57b233e5736595b65ef169 /src/mount | |
parent | 599c7c545f689f7d19a73238eecc69bf94fa6a74 (diff) | |
download | systemd-c3470872c6c12d64c895643bd3b02022beb0589e.tar.gz |
tree-wide: use parse_boolean_argument() for variables with non-boolean type
This still works nicely, but we need to assign the return value ourselves.
As before, one nice effect is that error messages are uniform.
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 5a8e8b1143..f30061dac7 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -288,9 +288,9 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_AUTOMOUNT: - r = parse_boolean(optarg); + r = parse_boolean_argument("--automount=", optarg, NULL); if (r < 0) - return log_error_errno(r, "--automount= expects a valid boolean parameter: %s", optarg); + return r; arg_action = r ? ACTION_AUTOMOUNT : ACTION_MOUNT; break; |