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