From patchwork Mon Feb 20 20:41:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 9583681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43083604A0 for ; Mon, 20 Feb 2017 20:46:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 297562889F for ; Mon, 20 Feb 2017 20:46:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D62E288A3; Mon, 20 Feb 2017 20:46:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 667152889F for ; Mon, 20 Feb 2017 20:46:14 +0000 (UTC) Received: from localhost ([::1]:41003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfuqb-0003HX-GP for patchwork-qemu-devel@patchwork.kernel.org; Mon, 20 Feb 2017 15:46:13 -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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 empty. Signed-off-by: Hervé 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 = "ide-hd", .flag = &default_cdrom }, { .driver = "ide-drive", .flag = &default_cdrom }, { .driver = "scsi-cd", .flag = &default_cdrom }, + { .driver = "scsi-hd", .flag = &default_cdrom }, { .driver = "virtio-serial-pci", .flag = &default_virtcon }, { .driver = "virtio-serial", .flag = &default_virtcon }, { .driver = "VGA", .flag = &default_vga },