From nobody Mon Feb 9 03:29:59 2026 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533818949840500.3373595209007; Thu, 9 Aug 2018 05:49:09 -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 EB0633082145; Thu, 9 Aug 2018 12:49:07 +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 B2FA265F51; Thu, 9 Aug 2018 12:49:07 +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 6480C18363F6; Thu, 9 Aug 2018 12:49:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w79Cn5Y1004695 for ; Thu, 9 Aug 2018 08:49:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id D889F21568A5; Thu, 9 Aug 2018 12:49:05 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 576F821568A3; Thu, 9 Aug 2018 12:49:05 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Aug 2018 14:48:55 +0200 Message-Id: <8dea23e8bc9d60897da749f424d9ee6c4300348c.1533818732.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/6] qemu: capabilities: Remove unused QEMU_CAPS_DRIVE_BOOT 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: , MIME-Version: 1.0 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.42]); Thu, 09 Aug 2018 12:49:08 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The capability was never set except for (stale) tests. Remove it. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 19 +------------------ tests/qemuxml2argvtest.c | 26 +++++++++----------------- 3 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index f48de7d89f..26813a908c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -52,7 +52,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for sy= ntax-check */ X_QEMU_CAPS_VNC_COLON, /* VNC takes or address + display */ X_QEMU_CAPS_NO_REBOOT, /* Is the -no-reboot flag available */ X_QEMU_CAPS_DRIVE, /* Is the new -drive arg available */ - QEMU_CAPS_DRIVE_BOOT, /* Does -drive support boot=3Don */ + X_QEMU_CAPS_DRIVE_BOOT, /* Does -drive support boot=3Don */ /* 5 */ X_QEMU_CAPS_NAME, /* Is the -name flag available */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d507e957a5..78090898be 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1632,7 +1632,7 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr d= isk, static char * qemuBuildDriveStr(virDomainDiskDefPtr disk, - bool bootable, + bool bootable ATTRIBUTE_UNUSED, virQEMUCapsPtr qemuCaps) { virBuffer opt =3D VIR_BUFFER_INITIALIZER; @@ -1689,15 +1689,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, } } - /* This is a frontend attribute which was replaced by bootindex passed= in - * with -device arguments. */ - if (bootable && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) && - (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_DISK || - disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_LUN) && - disk->bus !=3D VIR_DOMAIN_DISK_BUS_IDE) - virBufferAddLit(&opt, ",boot=3Don"); - if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=3Don"); @@ -10243,14 +10234,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildCommandLineValidate(driver, def) < 0) goto error; - /* - * do not use boot=3Don for drives when not using KVM since this - * is not supported at all in upstream QEMU. - */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) && - (def->virtType =3D=3D VIR_DOMAIN_VIRT_QEMU)) - virQEMUCapsClear(qemuCaps, QEMU_CAPS_DRIVE_BOOT); - cmd =3D virCommandNew(def->emulator); virCommandAddEnvPassCommon(cmd); diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b9dc6850e2..2860a53f00 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -882,13 +882,10 @@ mymain(void) DO_TEST("boot-order", QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-complex", - QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-complex-bootindex", - QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-strict", - QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_BOOT_STRICT, QEMU_CAPS_VIRTIO_BLK_SCSI); @@ -1012,31 +1009,26 @@ mymain(void) DO_TEST("disk-floppy-tray", NONE); DO_TEST("disk-virtio-s390", QEMU_CAPS_VIRTIO_S390); - DO_TEST("disk-virtio", QEMU_CAPS_DRIVE_BOOT); + DO_TEST("disk-virtio", NONE); DO_TEST("disk-virtio-ccw", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-virtio-ccw-many", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-virtio-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); - DO_TEST("disk-order", - QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_VIRTIO_BLK_SCSI); + DO_TEST("disk-order", QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("disk-virtio-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES); - DO_TEST("disk-boot-disk", - QEMU_CAPS_DRIVE_BOOT); - DO_TEST("disk-boot-cdrom", - QEMU_CAPS_DRIVE_BOOT); - DO_TEST("floppy-drive-fat", - QEMU_CAPS_DRIVE_BOOT); + DO_TEST("disk-boot-disk", NONE); + DO_TEST("disk-boot-cdrom", NONE); + DO_TEST("floppy-drive-fat", NONE); DO_TEST_CAPS_LATEST("floppy-drive-fat"); DO_TEST("disk-readonly-disk", NONE); DO_TEST_CAPS_LATEST("disk-readonly-disk"); - DO_TEST("disk-fmt-qcow", - QEMU_CAPS_DRIVE_BOOT); - DO_TEST_PARSE_ERROR("disk-fmt-cow", QEMU_CAPS_DRIVE_BOOT); - DO_TEST_PARSE_ERROR("disk-fmt-dir", QEMU_CAPS_DRIVE_BOOT); - DO_TEST_PARSE_ERROR("disk-fmt-iso", QEMU_CAPS_DRIVE_BOOT); + DO_TEST("disk-fmt-qcow", NONE); + DO_TEST_PARSE_ERROR("disk-fmt-cow", NONE); + DO_TEST_PARSE_ERROR("disk-fmt-dir", NONE); + DO_TEST_PARSE_ERROR("disk-fmt-iso", NONE); DO_TEST("disk-shared", NONE); DO_TEST_CAPS_LATEST("disk-shared"); DO_TEST_PARSE_ERROR("disk-shared-qcow", NONE); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list