From nobody Tue Nov 26 13:48:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570661062; cv=none; d=zoho.com; s=zohoarc; b=YxrOxDtWDMBj4OolZLdtbaZ4crEvUsbgnd2vPFsmV4rupFhsv+uZ7Fv0bK9CVgNseEbB+AXQ0LN2oBLh/d5JImQwl0Ui6ZZIXNcMvJJpSGTy8tc3NEZXXAeHBBOe/dr9kHhTNgTr+Qu98gdEYzzWN2XRw9sBWykhOCntbDJkMEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570661062; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LcuBCBt2OFaL01u4t0P+s3gGhdm115YO6WGB70RMEWg=; b=CDELQVXZ6gbLnN02fPRkCxiUOs2PU93c5kKAwtLI5t9j/kYRxq4RgZGkmwxY4DqedFyaQ99/JRYmvPJF4nycNuXIR4weQOORfMNyqEoWjG8gDBTt73CYqJfIKOx2hWH+7wfjUU87Po+bocIQMe7x1Rn/PznVci7xDSYGUUzisLU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1570661062938414.0485190817567; Wed, 9 Oct 2019 15:44:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD94E307D96D; Wed, 9 Oct 2019 22:44:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DCD060BF4; Wed, 9 Oct 2019 22:44:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 446D11803B49; Wed, 9 Oct 2019 22:44:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x99Mh9mJ002745 for ; Wed, 9 Oct 2019 18:43:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC114601A3; Wed, 9 Oct 2019 22:43:09 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-165.bos.redhat.com [10.18.17.165]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF40D600C4; Wed, 9 Oct 2019 22:43:08 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Wed, 9 Oct 2019 18:43:03 -0400 Message-Id: <20191009224303.10232-2-jsnow@redhat.com> In-Reply-To: <20191009224303.10232-1-jsnow@redhat.com> References: <20191009224303.10232-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Peter Krempa , qemu-block@nongnu.org, libvir-list@redhat.com, Max Reitz , John Snow Subject: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 09 Oct 2019 22:44:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object will make that easier. Either way, we don't need this. Libvirt-checked-by: Peter Krempa Signed-off-by: John Snow ACKed-by: Peter Krempa Reviewed-by: Markus Armbruster Reviewed-by: Thomas Huth --- qemu-deprecated.texi | 5 +++++ hw/ide/qdev.c | 3 +++ tests/qemu-iotests/051.pc.out | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 01245e0b1c4..7cd4648df3c 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -247,6 +247,11 @@ quite a bit. It will be removed without replacement un= less some users speaks up at the @email{qemu-devel@@nongnu.org} mailing list with information abo= ut their usecases. =20 +@subsection ide-drive (since 4.2) + +The 'ide-drive' device is deprecated. Users should use 'ide-hd' or +'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed. + @section System emulator machines =20 @subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 6fba6b62b87..3666e597211 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -279,6 +279,9 @@ static void ide_drive_realize(IDEDevice *dev, Error **e= rrp) { DriveInfo *dinfo =3D NULL; =20 + warn_report("'ide-drive' is deprecated, " + "please use 'ide-hd' or 'ide-cd' instead"); + if (dev->conf.blk) { dinfo =3D blk_legacy_dinfo(dev->conf.blk); } diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 000557c7c83..34849dd1720 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -158,7 +158,8 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: Device needs media, but = drive is empty +(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead +QEMU_PROG: -device ide-drive,drive=3Ddisk: Device needs media, but drive i= s empty =20 Testing: -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information @@ -228,7 +229,8 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-drive,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: Block node is read-only +(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead +QEMU_PROG: -device ide-drive,drive=3Ddisk: Block node is read-only =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list