summaryrefslogtreecommitdiffstats
path: root/src/vmspawn/vmspawn.c
diff options
context:
space:
mode:
authorSam Leonard <sam.leonard@codethink.co.uk>2024-04-12 09:36:55 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-04-12 14:26:36 +0200
commit0f85622950897060e87850f9e732482ed66e62d5 (patch)
tree602a8fa5909d599f3abd9dd478c6daa11b230115 /src/vmspawn/vmspawn.c
parentbus-polkit: fix return value for `varlink_allow_interactive_authentication()` (diff)
downloadsystemd-0f85622950897060e87850f9e732482ed66e62d5.tar.xz
systemd-0f85622950897060e87850f9e732482ed66e62d5.zip
vmspawn: update parse_boolean to parse_boolean_argument
Diffstat (limited to '')
-rw-r--r--src/vmspawn/vmspawn.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index 78fd32a564..dbd15e5f29 100644
--- a/src/vmspawn/vmspawn.c
+++ b/src/vmspawn/vmspawn.c
@@ -405,13 +405,9 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_REGISTER:
- r = parse_boolean(optarg);
- if (r < 0) {
- log_error("Failed to parse --register= argument: %s", optarg);
+ r = parse_boolean_argument("--register=", optarg, &arg_register);
+ if (r < 0)
return r;
- }
-
- arg_register = r;
break;
case ARG_BIND:
@@ -455,11 +451,9 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_PASS_SSH_KEY:
- r = parse_boolean(optarg);
+ r = parse_boolean_argument("--pass-ssh-key=", optarg, &arg_pass_ssh_key);
if (r < 0)
- return log_error_errno(r, "Failed to parse --pass-ssh-key= argument: %s", optarg);
-
- arg_pass_ssh_key = r;
+ return r;
break;
case ARG_SSH_KEY_TYPE: