vl: Fix error location of positional arguments
We blame badness in positional arguments on the last option argument: $ qemu-system-x86_64 -vnc :1 bad.img qemu-system-x86_64: -vnc :1: Could not open 'foo': No such file or directory I believe we've done this ever since we reported locations. Fix it to qemu-system-x86_64: bad.img: Could not open 'bad.img': No such file or directory Reported-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190318183312.4684-1-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
parent
d61d1a1fb2
commit
17f30eae12
1
vl.c
1
vl.c
|
@ -3119,6 +3119,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
if (optind >= argc)
|
if (optind >= argc)
|
||||||
break;
|
break;
|
||||||
if (argv[optind][0] != '-') {
|
if (argv[optind][0] != '-') {
|
||||||
|
loc_set_cmdline(argv, optind, 1);
|
||||||
drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
||||||
} else {
|
} else {
|
||||||
const QEMUOption *popt;
|
const QEMUOption *popt;
|
||||||
|
|
Loading…
Reference in New Issue