qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/8] vl: Fix error location of positional arguments


From: Markus Armbruster
Subject: [Qemu-devel] [PULL 1/8] vl: Fix error location of positional arguments
Date: Tue, 2 Apr 2019 15:01:05 +0200

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é <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
---
 vl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vl.c b/vl.c
index d61d5604e5..24572de0bd 100644
--- a/vl.c
+++ b/vl.c
@@ -3119,6 +3119,7 @@ int main(int argc, char **argv, char **envp)
         if (optind >= argc)
             break;
         if (argv[optind][0] != '-') {
+            loc_set_cmdline(argv, optind, 1);
             drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
         } else {
             const QEMUOption *popt;
-- 
2.17.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]