diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-02-10 23:49:54 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-19 15:18:17 -0600 |
commit | aeb91c1e13d574ce71a408fb4cf836fbc45b40ab (patch) | |
tree | 35192599191fb50afec5d887e5f66e6a59bde51d /monitor.c | |
parent | 6ad3ebd28e7fe261b3a99d033d8c990b1d93b366 (diff) |
Monitor: Convert do_closefd() to cmd_new_ret()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |