aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 9466c63ba7..9338d13e83 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2447,7 +2447,7 @@ static int do_getfd(Monitor *mon, const QDict *qdict, QObject **ret_data)
return 0;
}
-static void do_closefd(Monitor *mon, const QDict *qdict, QObject **ret_data)
+static int do_closefd(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
const char *fdname = qdict_get_str(qdict, "fdname");
mon_fd_t *monfd;
@@ -2461,10 +2461,11 @@ static void do_closefd(Monitor *mon, const QDict *qdict, QObject **ret_data)
close(monfd->fd);
qemu_free(monfd->name);
qemu_free(monfd);
- return;
+ return 0;
}
qemu_error_new(QERR_FD_NOT_FOUND, fdname);
+ return -1;
}
static void do_loadvm(Monitor *mon, const QDict *qdict)