mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 13:47:13 +03:00
qemu: monitor: Remove unused qemuMonitorQueryNamedBlockNodes and clean up
The top level API is unused so it can be removed but internally the JSON version is called by other monitor commands which extract information from the reply. Thus qemuMonitorJSONQueryNamedBlockNodes is unexported and moved appropriately. 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:
parent
c4fd7111b2
commit
4bcff43bc7
@ -3945,15 +3945,6 @@ qemuMonitorSetBlockThreshold(qemuMonitor *mon,
|
||||
}
|
||||
|
||||
|
||||
virJSONValue *
|
||||
qemuMonitorQueryNamedBlockNodes(qemuMonitor *mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONQueryNamedBlockNodes(mon, false);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info)
|
||||
{
|
||||
|
@ -1331,8 +1331,6 @@ int qemuMonitorSetBlockThreshold(qemuMonitor *mon,
|
||||
const char *nodename,
|
||||
unsigned long long threshold);
|
||||
|
||||
virJSONValue *qemuMonitorQueryNamedBlockNodes(qemuMonitor *mon);
|
||||
|
||||
int qemuMonitorSetWatchdogAction(qemuMonitor *mon,
|
||||
const char *action);
|
||||
|
||||
|
@ -2028,6 +2028,36 @@ qemuMonitorJSONSetDBusVMStateIdList(qemuMonitor *mon,
|
||||
}
|
||||
|
||||
|
||||
/* qemuMonitorJSONQueryNamedBlockNodes:
|
||||
* @mon: Monitor pointer
|
||||
*
|
||||
* This helper will attempt to make a "query-named-block-nodes" call and check for
|
||||
* errors before returning with the reply.
|
||||
*
|
||||
* Returns: NULL on error, reply on success
|
||||
*/
|
||||
static virJSONValue *
|
||||
qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon,
|
||||
bool flat)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("query-named-block-nodes",
|
||||
"B:flat", flat,
|
||||
NULL)))
|
||||
return NULL;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
return NULL;
|
||||
|
||||
if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
|
||||
return NULL;
|
||||
|
||||
return virJSONValueObjectStealArray(reply, "return");
|
||||
}
|
||||
|
||||
|
||||
/* qemuMonitorJSONQueryBlock:
|
||||
* @mon: Monitor pointer
|
||||
*
|
||||
@ -7854,28 +7884,6 @@ qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon,
|
||||
}
|
||||
|
||||
|
||||
virJSONValue *
|
||||
qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon,
|
||||
bool flat)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("query-named-block-nodes",
|
||||
"B:flat", flat,
|
||||
NULL)))
|
||||
return NULL;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
return NULL;
|
||||
|
||||
if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
|
||||
return NULL;
|
||||
|
||||
return virJSONValueObjectStealArray(reply, "return");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon,
|
||||
const char *action)
|
||||
|
@ -712,11 +712,6 @@ qemuMonitorJSONSetBlockThreshold(qemuMonitor *mon,
|
||||
unsigned long long threshold)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
virJSONValue *
|
||||
qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon,
|
||||
bool flat)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
int
|
||||
qemuMonitorJSONSetWatchdogAction(qemuMonitor *mon,
|
||||
const char *action)
|
||||
|
Loading…
x
Reference in New Issue
Block a user