From nobody Fri Apr 26 09:53:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487623630432634.8671117265496; Mon, 20 Feb 2017 12:47:10 -0800 (PST) Received: from localhost ([::1]:41008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfurU-0003t0-QY for importer@patchew.org; Mon, 20 Feb 2017 15:47:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfum4-0008DJ-PJ for qemu-devel@nongnu.org; Mon, 20 Feb 2017 15:41:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfum4-0007sv-4C for qemu-devel@nongnu.org; Mon, 20 Feb 2017 15:41:32 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:31472) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfulz-0007r1-DU; Mon, 20 Feb 2017 15:41:27 -0500 Received: from localhost.localdomain (unknown [82.227.227.196]) by smtp2-g21.free.fr (Postfix) with ESMTP id 0DC9120035B; Mon, 20 Feb 2017 21:41:21 +0100 (CET) From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Mon, 20 Feb 2017 21:41:19 +0100 Message-Id: <1487623279-29930-1-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 212.27.42.2 Subject: [Qemu-devel] [PATCH v2] vl: disable default cdrom when using explicitely scsi-hd 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: , Cc: qemu-block@nongnu.org, Michael Tokarev , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In commit af6bf1328ef90fae617857c02697e0174b84d596 (May 2011), ide-hd, ide-cd and scsi-cd have been added to disable default cdrom, "or else you can't put one on secondary master without -nodefaults". Make it the same for scsi-hd, so you can put one on scsi-id 2 without using -nodefaults. scsi-hd has probably been forgotten, as it has been added in the preceding commit (b443ae67130d32ad06b06fc9aa6d04d05ccd93ce). Affected users are the ones using a machine with SCSI devices and start QEMU with -device scsi-hd but without -device scsi-cd or -cdrom In that case, the default cdrom device will disappear instead of being empt= y. Signed-off-by: Herv=C3=A9 Poussineau --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 27d9829..4af95b3 100644 --- a/vl.c +++ b/vl.c @@ -226,6 +226,7 @@ static struct { { .driver =3D "ide-hd", .flag =3D &default_cdrom }, { .driver =3D "ide-drive", .flag =3D &default_cdrom }, { .driver =3D "scsi-cd", .flag =3D &default_cdrom }, + { .driver =3D "scsi-hd", .flag =3D &default_cdrom }, { .driver =3D "virtio-serial-pci", .flag =3D &default_virtcon }, { .driver =3D "virtio-serial", .flag =3D &default_virtcon }, { .driver =3D "VGA", .flag =3D &default_vga }, --=20 2.1.4