libvirt/SOURCES/libvirt-qemu-domain-Remove-unused-qemuDomainDiskNodeFormatLookup.patch

67 lines
2.3 KiB
Diff
Raw Normal View History

From 448ed3bee3e5b3a12a7bd0acd40ca0729214fba3 Mon Sep 17 00:00:00 2001
Message-Id: <448ed3bee3e5b3a12a7bd0acd40ca0729214fba3@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 4 Feb 2020 15:07:55 +0100
Subject: [PATCH] qemu: domain: Remove unused qemuDomainDiskNodeFormatLookup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The function has no users now and there's no need for it as the common
pattern is to look up the whole disk object anyways.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 180b3422e9a3391a0ee59d0076730ba85778fc7a)
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
Message-Id: <b6ab98ea54aced2d9aeb9abdca30fc4669b92bbe.1580824112.git.pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/qemu/qemu_domain.c | 14 --------------
src/qemu/qemu_domain.h | 3 ---
2 files changed, 17 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index be9de75909..94efcdf9b1 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -12092,20 +12092,6 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
}
-/* Return the format node name for a given disk of an online guest */
-const char *
-qemuDomainDiskNodeFormatLookup(virDomainObjPtr vm,
- const char *disk)
-{
- size_t i;
-
- for (i = 0; i < vm->def->ndisks; i++) {
- if (STREQ(vm->def->disks[i]->dst, disk))
- return vm->def->disks[i]->src->nodeformat;
- }
- return NULL;
-}
-
bool
qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk)
{
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index d1ab5da2c7..cdcb6ecc7a 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -865,9 +865,6 @@ int qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
bool qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
virDomainDiskDefPtr orig_disk);
-const char *qemuDomainDiskNodeFormatLookup(virDomainObjPtr vm,
- const char *disk);
-
void qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
virDomainObjPtr vm,
virStorageSourcePtr src,
--
2.25.0