machinectl: fix argument index in error log

Fixes #11628.
This commit is contained in:
Yu Watanabe
2019-02-02 15:03:17 +01:00
committed by Lennart Poettering
parent b858d7d9d2
commit 19df01f529

View File

@@ -1739,7 +1739,7 @@ static int start_machine(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
if (r == 0) {
log_error("Machine image '%s' does not exist.", argv[1]);
log_error("Machine image '%s' does not exist.", argv[i]);
return -ENXIO;
}
@@ -1811,7 +1811,7 @@ static int enable_machine(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
if (r == 0) {
log_error("Machine image '%s' does not exist.", argv[1]);
log_error("Machine image '%s' does not exist.", argv[i]);
return -ENXIO;
}