From nobody Mon Feb 9 09:51:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554211602428192.21876573372094; Tue, 2 Apr 2019 06:26:42 -0700 (PDT) Received: from localhost ([127.0.0.1]:57623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBJQw-0002Nd-Eb for importer@patchew.org; Tue, 02 Apr 2019 09:26:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBJ2Y-0005Zf-34 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:01:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBJ2W-0001P6-Nl for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:01:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBJ2V-0001NK-Sa for qemu-devel@nongnu.org; Tue, 02 Apr 2019 09:01:20 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D50565419 for ; Tue, 2 Apr 2019 13:01:14 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF84164047 for ; Tue, 2 Apr 2019 13:01:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 54C751132BB6; Tue, 2 Apr 2019 15:01:12 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 2 Apr 2019 15:01:05 +0200 Message-Id: <20190402130112.15142-2-armbru@redhat.com> In-Reply-To: <20190402130112.15142-1-armbru@redhat.com> References: <20190402130112.15142-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 02 Apr 2019 13:01:14 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/8] vl: Fix error location of positional arguments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 dire= ctory 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=C3=A9 Signed-off-by: Markus Armbruster Message-Id: <20190318183312.4684-1-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Stefano Garzarella --- 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 >=3D argc) break; if (argv[optind][0] !=3D '-') { + loc_set_cmdline(argv, optind, 1); drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS); } else { const QEMUOption *popt; --=20 2.17.2