mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemuMonitorAddFileHandleToSet: Remove return of 'qemuMonitorAddFdInfo'
The only caller doesn't use the fdset info any more. 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
1e925d1c17
commit
c8f255c10e
@ -266,13 +266,10 @@ qemuFDPassTransferMonitor(qemuFDPass *fdpass,
|
|||||||
|
|
||||||
for (i = 0; i < fdpass->nfds; i++) {
|
for (i = 0; i < fdpass->nfds; i++) {
|
||||||
if (fdpass->useFDSet) {
|
if (fdpass->useFDSet) {
|
||||||
qemuMonitorAddFdInfo fdsetinfo;
|
|
||||||
|
|
||||||
if (qemuMonitorAddFileHandleToSet(mon,
|
if (qemuMonitorAddFileHandleToSet(mon,
|
||||||
fdpass->fds[i].fd,
|
fdpass->fds[i].fd,
|
||||||
fdpass->fdSetID,
|
fdpass->fdSetID,
|
||||||
fdpass->fds[i].opaque,
|
fdpass->fds[i].opaque) < 0)
|
||||||
&fdsetinfo) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
if (qemuMonitorSendFileHandle(mon,
|
if (qemuMonitorSendFileHandle(mon,
|
||||||
|
@ -2506,7 +2506,6 @@ qemuMonitorGraphicsRelocate(qemuMonitor *mon,
|
|||||||
* @fd: file descriptor to pass to qemu
|
* @fd: file descriptor to pass to qemu
|
||||||
* @fdset: the fdset to register this fd with, -1 to create a new fdset
|
* @fdset: the fdset to register this fd with, -1 to create a new fdset
|
||||||
* @opaque: opaque data to associated with this fd
|
* @opaque: opaque data to associated with this fd
|
||||||
* @info: structure that will be updated with the fd and fdset returned by qemu
|
|
||||||
*
|
*
|
||||||
* Attempts to register a file descriptor with qemu that can then be referenced
|
* Attempts to register a file descriptor with qemu that can then be referenced
|
||||||
* via the file path /dev/fdset/$FDSETID
|
* via the file path /dev/fdset/$FDSETID
|
||||||
@ -2515,8 +2514,7 @@ int
|
|||||||
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
|
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
|
||||||
int fd,
|
int fd,
|
||||||
int fdset,
|
int fdset,
|
||||||
const char *opaque,
|
const char *opaque)
|
||||||
qemuMonitorAddFdInfo *info)
|
|
||||||
{
|
{
|
||||||
VIR_DEBUG("fd=%d,fdset=%i,opaque=%s", fd, fdset, opaque);
|
VIR_DEBUG("fd=%d,fdset=%i,opaque=%s", fd, fdset, opaque);
|
||||||
|
|
||||||
@ -2528,7 +2526,7 @@ qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return qemuMonitorJSONAddFileHandleToSet(mon, fd, fdset, opaque, info);
|
return qemuMonitorJSONAddFileHandleToSet(mon, fd, fdset, opaque);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -941,16 +941,11 @@ int qemuMonitorGraphicsRelocate(qemuMonitor *mon,
|
|||||||
int tlsPort,
|
int tlsPort,
|
||||||
const char *tlsSubject);
|
const char *tlsSubject);
|
||||||
|
|
||||||
typedef struct _qemuMonitorAddFdInfo qemuMonitorAddFdInfo;
|
|
||||||
struct _qemuMonitorAddFdInfo {
|
|
||||||
int fdset;
|
|
||||||
};
|
|
||||||
int
|
int
|
||||||
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
|
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
|
||||||
int fd,
|
int fd,
|
||||||
int fdset,
|
int fdset,
|
||||||
const char *opaque,
|
const char *opaque);
|
||||||
qemuMonitorAddFdInfo *info);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMonitorRemoveFdset(qemuMonitor *mon,
|
qemuMonitorRemoveFdset(qemuMonitor *mon,
|
||||||
|
@ -3594,34 +3594,11 @@ int qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
int
|
||||||
qemuAddfdInfoParse(virJSONValue *msg,
|
qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
|
||||||
qemuMonitorAddFdInfo *fdinfo)
|
int fd,
|
||||||
{
|
int fdset,
|
||||||
virJSONValue *returnObj;
|
const char *opaque)
|
||||||
|
|
||||||
if (!(returnObj = virJSONValueObjectGetObject(msg, "return"))) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Missing or invalid return data 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"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* if fdset is negative, qemu will create a new fdset and add the fd to that */
|
|
||||||
int qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
|
|
||||||
int fd,
|
|
||||||
int fdset,
|
|
||||||
const char *opaque,
|
|
||||||
qemuMonitorAddFdInfo *fdinfo)
|
|
||||||
{
|
{
|
||||||
g_autoptr(virJSONValue) args = NULL;
|
g_autoptr(virJSONValue) args = NULL;
|
||||||
g_autoptr(virJSONValue) reply = NULL;
|
g_autoptr(virJSONValue) reply = NULL;
|
||||||
@ -3644,12 +3621,10 @@ int qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
|
|||||||
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
|
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuAddfdInfoParse(reply, fdinfo) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
||||||
qemuMonitorFdsets **fdsets)
|
qemuMonitorFdsets **fdsets)
|
||||||
|
@ -253,8 +253,7 @@ int
|
|||||||
qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
|
qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
|
||||||
int fd,
|
int fd,
|
||||||
int fdset,
|
int fdset,
|
||||||
const char *opaque,
|
const char *opaque);
|
||||||
qemuMonitorAddFdInfo *info);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMonitorJSONRemoveFdset(qemuMonitor *mon,
|
qemuMonitorJSONRemoveFdset(qemuMonitor *mon,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user