mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: monitor: Drop QEMU_CHECK_MONITOR_JSON... macros
Monitor is now JSON only. Drop the old cruft. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
83da9832c2
commit
10bc01056b
@ -119,14 +119,13 @@ struct _qemuMonitor {
|
||||
/**
|
||||
* QEMU_CHECK_MONITOR_FULL:
|
||||
* @mon: monitor pointer variable to check, evaluated multiple times, no parentheses
|
||||
* @force_json: force JSON monitor, true or false
|
||||
* @exit: statement that is used to exit the function
|
||||
*
|
||||
* This macro checks that the monitor is valid for given operation and exits
|
||||
* the function if not. The macro also adds a debug statement regarding the
|
||||
* monitor.
|
||||
*/
|
||||
#define QEMU_CHECK_MONITOR_FULL(mon, force_json, exit) \
|
||||
#define QEMU_CHECK_MONITOR_FULL(mon, exit) \
|
||||
do { \
|
||||
if (!mon) { \
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s", \
|
||||
@ -135,7 +134,7 @@ struct _qemuMonitor {
|
||||
} \
|
||||
VIR_DEBUG("mon:%p vm:%p json:%d fd:%d", \
|
||||
mon, mon->vm, mon->json, mon->fd); \
|
||||
if (force_json && !mon->json) { \
|
||||
if (!mon->json) { \
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", \
|
||||
_("JSON monitor is required")); \
|
||||
exit; \
|
||||
@ -144,21 +143,15 @@ struct _qemuMonitor {
|
||||
|
||||
/* Check monitor and return NULL on error */
|
||||
#define QEMU_CHECK_MONITOR_NULL(mon) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, false, return NULL)
|
||||
#define QEMU_CHECK_MONITOR_JSON_NULL(mon) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, true, return NULL)
|
||||
QEMU_CHECK_MONITOR_FULL(mon, return NULL)
|
||||
|
||||
/* Check monitor and return -1 on error */
|
||||
#define QEMU_CHECK_MONITOR(mon) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, false, return -1)
|
||||
#define QEMU_CHECK_MONITOR_JSON(mon) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, true, return -1)
|
||||
QEMU_CHECK_MONITOR_FULL(mon, return -1)
|
||||
|
||||
/* Check monitor and jump to the provided label */
|
||||
#define QEMU_CHECK_MONITOR_GOTO(mon, label) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, false, goto label)
|
||||
#define QEMU_CHECK_MONITOR_JSON_GOTO(mon, label) \
|
||||
QEMU_CHECK_MONITOR_FULL(mon, true, goto label)
|
||||
QEMU_CHECK_MONITOR_FULL(mon, goto label)
|
||||
|
||||
static virClassPtr qemuMonitorClass;
|
||||
static void qemuMonitorDispose(void *obj);
|
||||
@ -2280,7 +2273,7 @@ qemuMonitorGetBlockInfo(qemuMonitorPtr mon)
|
||||
virJSONValuePtr
|
||||
qemuMonitorQueryBlockstats(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONQueryBlockstats(mon);
|
||||
}
|
||||
@ -2345,7 +2338,7 @@ qemuMonitorBlockStatsUpdateCapacity(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("stats=%p, backing=%d", stats, backingChain);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockStatsUpdateCapacity(mon, stats, backingChain);
|
||||
}
|
||||
@ -2602,7 +2595,7 @@ qemuMonitorGetMigrationCacheSize(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("cacheSize=%p", cacheSize);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetMigrationCacheSize(mon, cacheSize);
|
||||
}
|
||||
@ -2614,7 +2607,7 @@ qemuMonitorSetMigrationCacheSize(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("cacheSize=%llu", cacheSize);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONSetMigrationCacheSize(mon, cacheSize);
|
||||
}
|
||||
@ -2635,7 +2628,7 @@ int
|
||||
qemuMonitorGetMigrationParams(qemuMonitorPtr mon,
|
||||
virJSONValuePtr *params)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetMigrationParams(mon, params);
|
||||
}
|
||||
@ -2655,7 +2648,7 @@ int
|
||||
qemuMonitorSetMigrationParams(qemuMonitorPtr mon,
|
||||
virJSONValuePtr params)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_GOTO(mon, error);
|
||||
QEMU_CHECK_MONITOR_GOTO(mon, error);
|
||||
|
||||
return qemuMonitorJSONSetMigrationParams(mon, params);
|
||||
|
||||
@ -2755,7 +2748,7 @@ int
|
||||
qemuMonitorQueryDump(qemuMonitorPtr mon,
|
||||
qemuMonitorDumpStatsPtr stats)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONQueryDump(mon, stats);
|
||||
}
|
||||
@ -2789,7 +2782,7 @@ qemuMonitorDumpToFd(qemuMonitorPtr mon,
|
||||
int ret;
|
||||
VIR_DEBUG("fd=%d dumpformat=%s", fd, dumpformat);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
if (qemuMonitorSendFileHandle(mon, "dump", fd) < 0)
|
||||
return -1;
|
||||
@ -2899,7 +2892,7 @@ qemuMonitorAddFd(qemuMonitorPtr mon, int fdset, int fd, const char *name)
|
||||
{
|
||||
VIR_DEBUG("fdset=%d, fd=%d, name=%s", fdset, fd, NULLSTR(name));
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
if (fd < 0 || fdset < 0) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
@ -2931,7 +2924,7 @@ qemuMonitorRemoveFd(qemuMonitorPtr mon, int fdset, int fd)
|
||||
|
||||
error = virSaveLastError();
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON_GOTO(mon, cleanup);
|
||||
QEMU_CHECK_MONITOR_GOTO(mon, cleanup);
|
||||
|
||||
ret = qemuMonitorJSONRemoveFd(mon, fdset, fd);
|
||||
|
||||
@ -3011,7 +3004,7 @@ qemuMonitorQueryRxFilter(qemuMonitorPtr mon, const char *alias,
|
||||
{
|
||||
VIR_DEBUG("alias=%s filter=%p", alias, filter);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONQueryRxFilter(mon, alias, filter);
|
||||
}
|
||||
@ -3143,7 +3136,7 @@ int
|
||||
qemuMonitorAddDeviceArgs(qemuMonitorPtr mon,
|
||||
virJSONValuePtr args)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONAddDeviceArgs(mon, args);
|
||||
}
|
||||
@ -3167,7 +3160,7 @@ qemuMonitorAddObject(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("type=%s objalias=%s props=%p", type, objalias, props);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON_GOTO(mon, error);
|
||||
QEMU_CHECK_MONITOR_GOTO(mon, error);
|
||||
|
||||
return qemuMonitorJSONAddObject(mon, type, objalias, props);
|
||||
|
||||
@ -3183,7 +3176,7 @@ qemuMonitorDelObject(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("objalias=%s", objalias);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONDelObject(mon, objalias);
|
||||
}
|
||||
@ -3270,7 +3263,7 @@ qemuMonitorDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions,
|
||||
VIR_DEBUG("actions=%p, device=%s, file=%s, format=%s, reuse=%d",
|
||||
actions, device, file, format, reuse);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONDiskSnapshot(mon, actions, device, file, format, reuse);
|
||||
}
|
||||
@ -3289,7 +3282,7 @@ qemuMonitorDriveMirror(qemuMonitorPtr mon,
|
||||
device, file, NULLSTR(format), bandwidth, granularity,
|
||||
buf_size, flags);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONDriveMirror(mon, device, file, format, bandwidth,
|
||||
granularity, buf_size, flags);
|
||||
@ -3311,7 +3304,7 @@ qemuMonitorBlockdevMirror(qemuMonitorPtr mon,
|
||||
NULLSTR(jobname), device, target, bandwidth, granularity,
|
||||
buf_size, flags);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockdevMirror(mon, jobname, device, target, bandwidth,
|
||||
granularity, buf_size, flags);
|
||||
@ -3324,7 +3317,7 @@ qemuMonitorTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
|
||||
{
|
||||
VIR_DEBUG("actions=%p", *actions);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONTransaction(mon, actions);
|
||||
}
|
||||
@ -3340,7 +3333,7 @@ qemuMonitorBlockCommit(qemuMonitorPtr mon, const char *device,
|
||||
VIR_DEBUG("device=%s, top=%s, base=%s, backingName=%s, bandwidth=%llu",
|
||||
device, top, base, NULLSTR(backingName), bandwidth);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockCommit(mon, device, top, base,
|
||||
backingName, bandwidth);
|
||||
@ -3366,7 +3359,7 @@ qemuMonitorDiskNameLookup(qemuMonitorPtr mon,
|
||||
virStorageSourcePtr top,
|
||||
virStorageSourcePtr target)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONDiskNameLookup(mon, device, top, target);
|
||||
}
|
||||
@ -3379,7 +3372,7 @@ qemuMonitorDrivePivot(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("device=%s", device);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONDrivePivot(mon, device);
|
||||
}
|
||||
@ -3459,7 +3452,7 @@ qemuMonitorBlockStream(qemuMonitorPtr mon,
|
||||
VIR_DEBUG("device=%s, base=%s, backingName=%s, bandwidth=%lluB",
|
||||
device, NULLSTR(base), NULLSTR(backingName), bandwidth);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockStream(mon, device, base, backingName, bandwidth);
|
||||
}
|
||||
@ -3471,7 +3464,7 @@ qemuMonitorBlockJobCancel(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("device=%s", device);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockJobCancel(mon, device);
|
||||
}
|
||||
@ -3484,7 +3477,7 @@ qemuMonitorBlockJobSetSpeed(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("device=%s, bandwidth=%lluB", device, bandwidth);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockJobSetSpeed(mon, device, bandwidth);
|
||||
}
|
||||
@ -3493,7 +3486,7 @@ qemuMonitorBlockJobSetSpeed(qemuMonitorPtr mon,
|
||||
virHashTablePtr
|
||||
qemuMonitorGetAllBlockJobInfo(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
return qemuMonitorJSONGetAllBlockJobInfo(mon);
|
||||
}
|
||||
|
||||
@ -3653,7 +3646,7 @@ qemuMonitorOpenGraphics(qemuMonitorPtr mon,
|
||||
int
|
||||
qemuMonitorSystemWakeup(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONSystemWakeup(mon);
|
||||
}
|
||||
@ -3669,7 +3662,7 @@ qemuMonitorGetVersion(qemuMonitorPtr mon,
|
||||
VIR_DEBUG("major=%p minor=%p micro=%p package=%p",
|
||||
major, minor, micro, package);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetVersion(mon, major, minor, micro, package);
|
||||
}
|
||||
@ -3681,7 +3674,7 @@ qemuMonitorGetMachines(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("machines=%p", machines);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetMachines(mon, machines);
|
||||
}
|
||||
@ -3704,7 +3697,7 @@ qemuMonitorGetCPUDefinitions(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("cpus=%p", cpus);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetCPUDefinitions(mon, cpus);
|
||||
}
|
||||
@ -3732,7 +3725,7 @@ qemuMonitorGetCPUModelExpansion(qemuMonitorPtr mon,
|
||||
VIR_DEBUG("type=%d model_name=%s migratable=%d",
|
||||
type, model_name, migratable);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetCPUModelExpansion(mon, type, model_name,
|
||||
migratable, model_info);
|
||||
@ -3817,7 +3810,7 @@ qemuMonitorGetCommands(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("commands=%p", commands);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetCommands(mon, commands);
|
||||
}
|
||||
@ -3829,7 +3822,7 @@ qemuMonitorGetEvents(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("events=%p", events);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetEvents(mon, events);
|
||||
}
|
||||
@ -3845,7 +3838,7 @@ qemuMonitorGetCommandLineOptionParameters(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("option=%s params=%p", option, params);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetCommandLineOptionParameters(mon, option,
|
||||
params, found);
|
||||
@ -3859,7 +3852,7 @@ qemuMonitorGetKVMState(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("enabled=%p present=%p", enabled, present);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetKVMState(mon, enabled, present);
|
||||
}
|
||||
@ -3871,7 +3864,7 @@ qemuMonitorGetObjectTypes(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("types=%p", types);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetObjectTypes(mon, types);
|
||||
}
|
||||
@ -3884,7 +3877,7 @@ qemuMonitorGetDeviceProps(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("device=%s props=%p", device, props);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetDeviceProps(mon, device, props);
|
||||
}
|
||||
@ -3897,7 +3890,7 @@ qemuMonitorGetObjectProps(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("object=%s props=%p", object, props);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetObjectProps(mon, object, props);
|
||||
}
|
||||
@ -3906,7 +3899,7 @@ qemuMonitorGetObjectProps(qemuMonitorPtr mon,
|
||||
char *
|
||||
qemuMonitorGetTargetArch(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONGetTargetArch(mon);
|
||||
}
|
||||
@ -3940,7 +3933,7 @@ int
|
||||
qemuMonitorSetMigrationCapabilities(qemuMonitorPtr mon,
|
||||
virJSONValuePtr caps)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_GOTO(mon, error);
|
||||
QEMU_CHECK_MONITOR_GOTO(mon, error);
|
||||
|
||||
return qemuMonitorJSONSetMigrationCapabilities(mon, caps);
|
||||
|
||||
@ -3961,7 +3954,7 @@ int
|
||||
qemuMonitorGetGICCapabilities(qemuMonitorPtr mon,
|
||||
virGICCapability **capabilities)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetGICCapabilities(mon, capabilities);
|
||||
}
|
||||
@ -3975,7 +3968,7 @@ qemuMonitorNBDServerStart(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("host=%s port=%u tls_alias=%s", host, port, NULLSTR(tls_alias));
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONNBDServerStart(mon, host, port, tls_alias);
|
||||
}
|
||||
@ -3988,7 +3981,7 @@ qemuMonitorNBDServerAdd(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("deviceID=%s", deviceID);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONNBDServerAdd(mon, deviceID, writable);
|
||||
}
|
||||
@ -3997,7 +3990,7 @@ qemuMonitorNBDServerAdd(qemuMonitorPtr mon,
|
||||
int
|
||||
qemuMonitorNBDServerStop(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONNBDServerStop(mon);
|
||||
}
|
||||
@ -4009,7 +4002,7 @@ qemuMonitorGetTPMModels(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("tpmmodels=%p", tpmmodels);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetTPMModels(mon, tpmmodels);
|
||||
}
|
||||
@ -4021,7 +4014,7 @@ qemuMonitorGetTPMTypes(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("tpmtypes=%p", tpmtypes);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetTPMTypes(mon, tpmtypes);
|
||||
}
|
||||
@ -4034,7 +4027,7 @@ qemuMonitorAttachCharDev(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("chrID=%s chr=%p", chrID, chr);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONAttachCharDev(mon, chrID, chr);
|
||||
}
|
||||
@ -4046,7 +4039,7 @@ qemuMonitorDetachCharDev(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("chrID=%s", chrID);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONDetachCharDev(mon, chrID);
|
||||
}
|
||||
@ -4058,7 +4051,7 @@ qemuMonitorGetDeviceAliases(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("aliases=%p", aliases);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetDeviceAliases(mon, aliases);
|
||||
}
|
||||
@ -4134,7 +4127,7 @@ qemuMonitorGetGuestCPU(qemuMonitorPtr mon,
|
||||
VIR_DEBUG("arch=%s data=%p disabled=%p",
|
||||
virArchToString(arch), data, disabled);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
*data = NULL;
|
||||
if (disabled)
|
||||
@ -4159,7 +4152,7 @@ qemuMonitorGetGuestCPU(qemuMonitorPtr mon,
|
||||
int
|
||||
qemuMonitorRTCResetReinjection(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONRTCResetReinjection(mon);
|
||||
}
|
||||
@ -4239,7 +4232,7 @@ qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("uri=%s", uri);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONMigrateIncoming(mon, uri);
|
||||
}
|
||||
@ -4248,7 +4241,7 @@ qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
|
||||
int
|
||||
qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONMigrateStartPostCopy(mon);
|
||||
}
|
||||
@ -4260,7 +4253,7 @@ qemuMonitorMigrateContinue(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("status=%s", qemuMonitorMigrationStatusTypeToString(status));
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONMigrateContinue(mon, status);
|
||||
}
|
||||
@ -4270,7 +4263,7 @@ int
|
||||
qemuMonitorGetRTCTime(qemuMonitorPtr mon,
|
||||
struct tm *tm)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONGetRTCTime(mon, tm);
|
||||
}
|
||||
@ -4279,7 +4272,7 @@ qemuMonitorGetRTCTime(qemuMonitorPtr mon,
|
||||
virJSONValuePtr
|
||||
qemuMonitorQueryQMPSchema(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONQueryQMPSchema(mon);
|
||||
}
|
||||
@ -4292,7 +4285,7 @@ qemuMonitorSetBlockThreshold(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("node='%s', threshold=%llu", nodename, threshold);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONSetBlockThreshold(mon, nodename, threshold);
|
||||
}
|
||||
@ -4301,7 +4294,7 @@ qemuMonitorSetBlockThreshold(qemuMonitorPtr mon,
|
||||
virJSONValuePtr
|
||||
qemuMonitorQueryNamedBlockNodes(qemuMonitorPtr mon)
|
||||
{
|
||||
QEMU_CHECK_MONITOR_JSON_NULL(mon);
|
||||
QEMU_CHECK_MONITOR_NULL(mon);
|
||||
|
||||
return qemuMonitorJSONQueryNamedBlockNodes(mon);
|
||||
}
|
||||
@ -4364,7 +4357,7 @@ qemuMonitorSetWatchdogAction(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("watchdogAction=%s", action);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONSetWatchdogAction(mon, action);
|
||||
}
|
||||
@ -4385,7 +4378,7 @@ qemuMonitorBlockdevAdd(qemuMonitorPtr mon,
|
||||
VIR_DEBUG("props=%p (node-name=%s)", props,
|
||||
NULLSTR(virJSONValueObjectGetString(props, "node-name")));
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON_GOTO(mon, error);
|
||||
QEMU_CHECK_MONITOR_GOTO(mon, error);
|
||||
|
||||
return qemuMonitorJSONBlockdevAdd(mon, props);
|
||||
|
||||
@ -4401,7 +4394,7 @@ qemuMonitorBlockdevDel(qemuMonitorPtr mon,
|
||||
{
|
||||
VIR_DEBUG("nodename=%s", nodename);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockdevDel(mon, nodename);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user