aboutsummaryrefslogtreecommitdiff
path: root/monitor/misc.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-12-14 22:42:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-14 22:42:14 +0000
commitae2b87341b5ddb0dcb1b3f2d4f586ef18de75873 (patch)
tree3af0e07d7aca1a635cdd13966ce5688e5ec79585 /monitor/misc.c
parent5204b499a6cae4dfd9fe762d5e6e82224892383b (diff)
parent5efb40d6571457c3cc35b7a91088cc2fceee5763 (diff)
Merge tag 'pull-qapi-2022-12-14-v2' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2022-12-14 # gpg: Signature made Wed 14 Dec 2022 19:14:34 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-qapi-2022-12-14-v2' of https://repo.or.cz/qemu/armbru: (30 commits) qapi: Drop temporary logic to support conversion step by step qapi qga: Elide redundant has_FOO in generated C qapi virtio: Elide redundant has_FOO in generated C qapi ui: Elide redundant has_FOO in generated C qapi transaction: Elide redundant has_FOO in generated C qapi tpm: Elide redundant has_FOO in generated C qapi stats: Elide redundant has_FOO in generated C qapi run-state: Elide redundant has_FOO in generated C qapi rocker: Elide redundant has_FOO in generated C qapi replay: Elide redundant has_FOO in generated C qapi qdev qom: Elide redundant has_FOO in generated C qapi pci: Elide redundant has_FOO in generated C qapi net: Elide redundant has_FOO in generated C qapi misc: Elide redundant has_FOO in generated C qapi migration: Elide redundant has_FOO in generated C qapi machine: Elide redundant has_FOO in generated C qapi job: Elide redundant has_FOO in generated C qapi dump: Elide redundant has_FOO in generated C qapi crypto: Elide redundant has_FOO in generated C qapi chardev: Elide redundant has_FOO in generated C ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'monitor/misc.c')
-rw-r--r--monitor/misc.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/monitor/misc.c b/monitor/misc.c
index 205487e2b9..77aa5f1650 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -398,7 +398,7 @@ static void hmp_info_trace_events(Monitor *mon, const QDict *qdict)
void qmp_client_migrate_info(const char *protocol, const char *hostname,
bool has_port, int64_t port,
bool has_tls_port, int64_t tls_port,
- bool has_cert_subject, const char *cert_subject,
+ const char *cert_subject,
Error **errp)
{
if (strcmp(protocol, "spice") == 0) {
@@ -1132,7 +1132,7 @@ void monitor_fdsets_cleanup(void)
}
}
-AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
+AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id,
const char *opaque, Error **errp)
{
int fd;
@@ -1145,8 +1145,7 @@ AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
goto error;
}
- fdinfo = monitor_fdset_add_fd(fd, has_fdset_id, fdset_id,
- has_opaque, opaque, errp);
+ fdinfo = monitor_fdset_add_fd(fd, has_fdset_id, fdset_id, opaque, errp);
if (fdinfo) {
return fdinfo;
}
@@ -1214,12 +1213,7 @@ FdsetInfoList *qmp_query_fdsets(Error **errp)
fdsetfd_info = g_malloc0(sizeof(*fdsetfd_info));
fdsetfd_info->fd = mon_fdset_fd->fd;
- if (mon_fdset_fd->opaque) {
- fdsetfd_info->has_opaque = true;
- fdsetfd_info->opaque = g_strdup(mon_fdset_fd->opaque);
- } else {
- fdsetfd_info->has_opaque = false;
- }
+ fdsetfd_info->opaque = g_strdup(mon_fdset_fd->opaque);
QAPI_LIST_PREPEND(fdset_info->fds, fdsetfd_info);
}
@@ -1231,8 +1225,7 @@ FdsetInfoList *qmp_query_fdsets(Error **errp)
}
AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id,
- bool has_opaque, const char *opaque,
- Error **errp)
+ const char *opaque, Error **errp)
{
MonFdset *mon_fdset = NULL;
MonFdsetFd *mon_fdset_fd;
@@ -1300,9 +1293,7 @@ AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id,
mon_fdset_fd = g_malloc0(sizeof(*mon_fdset_fd));
mon_fdset_fd->fd = fd;
mon_fdset_fd->removed = false;
- if (has_opaque) {
- mon_fdset_fd->opaque = g_strdup(opaque);
- }
+ mon_fdset_fd->opaque = g_strdup(opaque);
QLIST_INSERT_HEAD(&mon_fdset->fds, mon_fdset_fd, next);
fdinfo = g_malloc0(sizeof(*fdinfo));