mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 18:05:20 +00:00
qemu: monitor: Don't parse actual fd's from query-fdsets/add-fd replies
Libvirt doesn't use the returned value and in fact there's nothing we could even do with them. Avoid parsing and storing them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1d3e955938
commit
4e64cded66
@ -943,7 +943,6 @@ int qemuMonitorGraphicsRelocate(qemuMonitor *mon,
|
||||
|
||||
typedef struct _qemuMonitorAddFdInfo qemuMonitorAddFdInfo;
|
||||
struct _qemuMonitorAddFdInfo {
|
||||
int fd;
|
||||
int fdset;
|
||||
};
|
||||
int
|
||||
@ -959,7 +958,6 @@ qemuMonitorRemoveFdset(qemuMonitor *mon,
|
||||
|
||||
typedef struct _qemuMonitorFdsetFdInfo qemuMonitorFdsetFdInfo;
|
||||
struct _qemuMonitorFdsetFdInfo {
|
||||
int fd;
|
||||
char *opaque;
|
||||
};
|
||||
typedef struct _qemuMonitorFdsetInfo qemuMonitorFdsetInfo;
|
||||
|
@ -3606,12 +3606,6 @@ qemuAddfdInfoParse(virJSONValue *msg,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberInt(returnObj, "fd", &fdinfo->fd) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Missing or invalid fd in add-fd response"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberInt(returnObj, "fdset-id", &fdinfo->fdset) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Missing or invalid fdset-id in add-fd response"));
|
||||
@ -3706,12 +3700,6 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberInt(fdentry, "fd", &fdinfo->fd) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("query-fdsets return data missing 'fd'"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* opaque is optional and may be missing */
|
||||
fdinfo->opaque = g_strdup(virJSONValueObjectGetString(fdentry, "opaque"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user