From nobody Sat Apr 20 09:47:15 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=1570393927; cv=none; d=zoho.com; s=zohoarc; b=HuKhJJaKIslNWIxcc/RZ65TrKKkEQ2dCA8EbLj7wKUcB3zf760xAvyT+WyA8zQuv2X0q8hplMi02tKnnUtCd1ZXFz4SyiCJ2VvtLZWndLQEwBYO6U98aRGRl0ovSZ15xfWjenPJTVhaq0nDqsDilmGKq9fEoe09Y3ipPKFs7t4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570393927; 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:ARC-Authentication-Results; bh=OJdo6ztU1FzYKOHVgRpXqkQdWwevxWA04ieqeV+pkEc=; b=AuUTJkp7DPO/7glAj0YEqC3+NO03alihqLYVWCgTVqF1Ujp9OhkjyHYPKg9MeEEkiD8pgNzLEbIeAF8Yx4P2cfGJEuvn2DR21UDJ7oaZsdW40mw7Fl60btXon0pu+Z4If0vk3QhKUswMfe+zov5RbOG+wJtlKtpXde66TCBrZq8= 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 1570393927192418.89694471076734; Sun, 6 Oct 2019 13:32:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0A3758E23; Sun, 6 Oct 2019 20:32:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 537D85D70D; Sun, 6 Oct 2019 20:32:02 +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 583B34E58B; Sun, 6 Oct 2019 20:31:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x96KVwh7029018 for ; Sun, 6 Oct 2019 16:31:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id A461F19C78; Sun, 6 Oct 2019 20:31:58 +0000 (UTC) Received: from probe.redhat.com (ovpn-120-66.rdu2.redhat.com [10.10.120.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABACA19C6A; Sun, 6 Oct 2019 20:31:57 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Sun, 6 Oct 2019 16:31:50 -0400 Message-Id: <20191006203150.13054-2-jsnow@redhat.com> In-Reply-To: <20191006203150.13054-1-jsnow@redhat.com> References: <20191006203150.13054-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Kevin Wolf , John Snow , qemu-block@nongnu.org, Max Reitz Subject: [libvirt] [PATCH 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sun, 06 Oct 2019 20:32:05 +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. Signed-off-by: John Snow --- 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..f802d83983e 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 CDROM 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..9ecee4da074 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("The 'ide-drive' device is deprecated. " + "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..93b9a1f82ca 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: The 'ide-drive'= device is deprecated. 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: The 'ide-drive'= device is deprecated. 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