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>
for (i = 0; i < fdpass->nfds; i++) {
if (fdpass->useFDSet) {
- qemuMonitorAddFdInfo fdsetinfo;
-
if (qemuMonitorAddFileHandleToSet(mon,
fdpass->fds[i].fd,
fdpass->fdSetID,
- fdpass->fds[i].opaque,
- &fdsetinfo) < 0)
+ fdpass->fds[i].opaque) < 0)
return -1;
} else {
if (qemuMonitorSendFileHandle(mon,
* @fd: file descriptor to pass to qemu
* @fdset: the fdset to register this fd with, -1 to create a new fdset
* @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
* via the file path /dev/fdset/$FDSETID
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
int fd,
int fdset,
- const char *opaque,
- qemuMonitorAddFdInfo *info)
+ const char *opaque)
{
VIR_DEBUG("fd=%d,fdset=%i,opaque=%s", fd, fdset, opaque);
return -1;
}
- return qemuMonitorJSONAddFileHandleToSet(mon, fd, fdset, opaque, info);
+ return qemuMonitorJSONAddFileHandleToSet(mon, fd, fdset, opaque);
}
int tlsPort,
const char *tlsSubject);
-typedef struct _qemuMonitorAddFdInfo qemuMonitorAddFdInfo;
-struct _qemuMonitorAddFdInfo {
- int fdset;
-};
int
qemuMonitorAddFileHandleToSet(qemuMonitor *mon,
int fd,
int fdset,
- const char *opaque,
- qemuMonitorAddFdInfo *info);
+ const char *opaque);
int
qemuMonitorRemoveFdset(qemuMonitor *mon,
}
-static int
-qemuAddfdInfoParse(virJSONValue *msg,
- qemuMonitorAddFdInfo *fdinfo)
-{
- virJSONValue *returnObj;
-
- 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)
+int
+qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
+ int fd,
+ int fdset,
+ const char *opaque)
{
g_autoptr(virJSONValue) args = NULL;
g_autoptr(virJSONValue) reply = NULL;
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
return -1;
- if (qemuAddfdInfoParse(reply, fdinfo) < 0)
- return -1;
-
return 0;
}
+
static int
qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
qemuMonitorFdsets **fdsets)
qemuMonitorJSONAddFileHandleToSet(qemuMonitor *mon,
int fd,
int fdset,
- const char *opaque,
- qemuMonitorAddFdInfo *info);
+ const char *opaque);
int
qemuMonitorJSONRemoveFdset(qemuMonitor *mon,