[PATCH] qemu: monitor: Remove diskSecretLookup monitor event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After the text monitor was deleted this event can't be triggered.
Remove it and all the unnecessary code.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---

This applies on top of the text monitor removal series. I forgot to
include it while splitting branches.

 src/qemu/qemu_monitor.c | 16 ----------------
 src/qemu/qemu_monitor.h | 12 ------------
 src/qemu/qemu_process.c | 28 ----------------------------
 3 files changed, 56 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index ac1fbddb91..02d2629eb0 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1287,22 +1287,6 @@ qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
     } while (0)


-int
-qemuMonitorGetDiskSecret(qemuMonitorPtr mon,
-                         const char *path,
-                         char **secret,
-                         size_t *secretLen)
-{
-    int ret = -1;
-    *secret = NULL;
-    *secretLen = 0;
-
-    QEMU_MONITOR_CALLBACK(mon, ret, diskSecretLookup, mon->vm,
-                          path, secret, secretLen);
-    return ret;
-}
-
-
 int
 qemuMonitorEmitEvent(qemuMonitorPtr mon, const char *event,
                      long long seconds, unsigned int micros,
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index b3aeb83cf0..212d1e3e16 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -121,12 +121,6 @@ typedef void (*qemuMonitorEofNotifyCallback)(qemuMonitorPtr mon,
 typedef void (*qemuMonitorErrorNotifyCallback)(qemuMonitorPtr mon,
                                                virDomainObjPtr vm,
                                                void *opaque);
-typedef int (*qemuMonitorDiskSecretLookupCallback)(qemuMonitorPtr mon,
-                                                   virDomainObjPtr vm,
-                                                   const char *path,
-                                                   char **secret,
-                                                   size_t *secretLen,
-                                                   void *opaque);
 typedef int (*qemuMonitorDomainEventCallback)(qemuMonitorPtr mon,
                                               virDomainObjPtr vm,
                                               const char *event,
@@ -285,7 +279,6 @@ struct _qemuMonitorCallbacks {
     qemuMonitorDestroyCallback destroy;
     qemuMonitorEofNotifyCallback eofNotify;
     qemuMonitorErrorNotifyCallback errorNotify;
-    qemuMonitorDiskSecretLookupCallback diskSecretLookup;
     qemuMonitorDomainEventCallback domainEvent;
     qemuMonitorDomainShutdownCallback domainShutdown;
     qemuMonitorDomainResetCallback domainReset;
@@ -369,11 +362,6 @@ int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
 # define qemuMonitorHMPCommand(mon, cmd, reply) \
     qemuMonitorHMPCommandWithFd(mon, cmd, -1, reply)

-int qemuMonitorGetDiskSecret(qemuMonitorPtr mon,
-                             const char *path,
-                             char **secret,
-                             size_t *secretLen);
-
 int qemuMonitorEmitEvent(qemuMonitorPtr mon, const char *event,
                          long long seconds, unsigned int micros,
                          const char *details);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 5b73a61962..2ba432630f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -436,33 +436,6 @@ qemuProcessGetVolumeQcowPassphrase(virDomainDiskDefPtr disk,
     return ret;
 }

-static int
-qemuProcessFindVolumeQcowPassphrase(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
-                                    virDomainObjPtr vm,
-                                    const char *path,
-                                    char **secretRet,
-                                    size_t *secretLen,
-                                    void *opaque ATTRIBUTE_UNUSED)
-{
-    virDomainDiskDefPtr disk;
-    int ret = -1;
-
-    virObjectLock(vm);
-    if (!(disk = virDomainDiskByName(vm->def, path, true))) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("no disk found with path %s"),
-                       path);
-        goto cleanup;
-    }
-
-    ret = qemuProcessGetVolumeQcowPassphrase(disk, secretRet, secretLen);
-
- cleanup:
-    virObjectUnlock(vm);
-    return ret;
-}
-
-
 static int
 qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                        virDomainObjPtr vm,
@@ -1709,7 +1682,6 @@ qemuProcessHandleDumpCompleted(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
 static qemuMonitorCallbacks monitorCallbacks = {
     .eofNotify = qemuProcessHandleMonitorEOF,
     .errorNotify = qemuProcessHandleMonitorError,
-    .diskSecretLookup = qemuProcessFindVolumeQcowPassphrase,
     .domainEvent = qemuProcessHandleEvent,
     .domainShutdown = qemuProcessHandleShutdown,
     .domainStop = qemuProcessHandleStop,
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux