qemu: monitor: Remove unused qemuMonitor(Eject|Change)Media

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-07-21 13:10:56 +02:00
parent 4ee6ca55f8
commit d2831cd521
5 changed files with 0 additions and 107 deletions

View File

@ -2105,33 +2105,6 @@ qemuMonitorSetBalloon(qemuMonitor *mon,
}
int
qemuMonitorEjectMedia(qemuMonitor *mon,
const char *dev_name,
bool force)
{
VIR_DEBUG("dev_name=%s force=%d", dev_name, force);
QEMU_CHECK_MONITOR(mon);
return qemuMonitorJSONEjectMedia(mon, dev_name, force);
}
int
qemuMonitorChangeMedia(qemuMonitor *mon,
const char *dev_name,
const char *newmedia,
const char *format)
{
VIR_DEBUG("dev_name=%s newmedia=%s format=%s", dev_name, newmedia, format);
QEMU_CHECK_MONITOR(mon);
return qemuMonitorJSONChangeMedia(mon, dev_name, newmedia, format);
}
int
qemuMonitorSaveVirtualMemory(qemuMonitor *mon,
unsigned long long offset,

View File

@ -729,15 +729,6 @@ int qemuMonitorExpirePassword(qemuMonitor *mon,
int qemuMonitorSetBalloon(qemuMonitor *mon,
unsigned long long newmem);
int qemuMonitorEjectMedia(qemuMonitor *mon,
const char *dev_name,
bool force);
int qemuMonitorChangeMedia(qemuMonitor *mon,
const char *dev_name,
const char *newmedia,
const char *format);
int qemuMonitorSaveVirtualMemory(qemuMonitor *mon,
unsigned long long offset,
unsigned long long length,

View File

@ -2784,63 +2784,6 @@ qemuMonitorJSONSetBalloon(qemuMonitor *mon,
}
/**
* Run QMP command to eject a media from ejectable device.
*
* Returns:
* -1 on error
* 0 on success
*/
int qemuMonitorJSONEjectMedia(qemuMonitor *mon,
const char *dev_name,
bool force)
{
g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("eject",
"s:device", dev_name,
"b:force", force,
NULL);
g_autoptr(virJSONValue) reply = NULL;
if (!cmd)
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
return -1;
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
return -1;
return 0;
}
int qemuMonitorJSONChangeMedia(qemuMonitor *mon,
const char *dev_name,
const char *newmedia,
const char *format)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
cmd = qemuMonitorJSONMakeCommand("change",
"s:device", dev_name,
"s:target", newmedia,
"S:arg", format,
NULL);
if (!cmd)
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
return -1;
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
return -1;
return 0;
}
static int qemuMonitorJSONSaveMemory(qemuMonitor *mon,
const char *cmdtype,
unsigned long long offset,

View File

@ -127,16 +127,6 @@ int
qemuMonitorJSONSetBalloon(qemuMonitor *mon,
unsigned long long newmem);
int
qemuMonitorJSONEjectMedia(qemuMonitor *mon,
const char *dev_name,
bool force);
int
qemuMonitorJSONChangeMedia(qemuMonitor *mon,
const char *dev_name,
const char *newmedia,
const char *format);
int
qemuMonitorJSONSaveVirtualMemory(qemuMonitor *mon,
unsigned long long offset,

View File

@ -1199,8 +1199,6 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockResize, "vda", "asdf", 123456)
GEN_TEST_FUNC(qemuMonitorJSONSetPassword, "spice", "secret_password", "disconnect")
GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice", "123456")
GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024)
GEN_TEST_FUNC(qemuMonitorJSONEjectMedia, "hdc", true)
GEN_TEST_FUNC(qemuMonitorJSONChangeMedia, "hdc", "/foo/bar", "formatstr")
GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar")
GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar")
GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND |
@ -2902,8 +2900,6 @@ mymain(void)
DO_TEST_GEN(qemuMonitorJSONSetPassword);
DO_TEST_GEN(qemuMonitorJSONExpirePassword);
DO_TEST_GEN(qemuMonitorJSONSetBalloon);
DO_TEST_GEN(qemuMonitorJSONEjectMedia);
DO_TEST_GEN_DEPRECATED(qemuMonitorJSONChangeMedia, true);
DO_TEST_GEN(qemuMonitorJSONSaveVirtualMemory);
DO_TEST_GEN(qemuMonitorJSONSavePhysicalMemory);
DO_TEST_GEN(qemuMonitorJSONMigrate);