static void do_closefd(Monitor *mon, const QDict *qdict)

{

    const char *fdname = qdict_get_str(qdict, "fdname");

    mon_fd_t *monfd;



    LIST_FOREACH(monfd, &mon->fds, next) {

        if (strcmp(monfd->name, fdname) != 0) {

            continue;

        }



        LIST_REMOVE(monfd, next);

        close(monfd->fd);

        qemu_free(monfd->name);

        qemu_free(monfd);

        return;

    }



    monitor_printf(mon, "Failed to find file descriptor named %s\n",

                   fdname);

}

static void do_closefd(Monitor *mon, const QDict *qdict)

{

    const char *fdname = qdict_get_str(qdict, "fdname");

    mon_fd_t *monfd;



    LIST_FOREACH(monfd, &mon->fds, next) {

        if (strcmp(monfd->name, fdname) != 0) {

            continue;

        }



        LIST_REMOVE(monfd, next);

        close(monfd->fd);

        qemu_free(monfd->name);

        qemu_free(monfd);

        return;

    }



    monitor_printf(mon, "Failed to find file descriptor named %s\n",

                   fdname);

}

static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)

{

    const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2");

    mon_fd_t *monfd;



    LIST_FOREACH(monfd, &VAR_0->fds, next) {

        if (strcmp(monfd->name, VAR_2) != 0) {

            continue;

        }



        LIST_REMOVE(monfd, next);

        close(monfd->fd);

        qemu_free(monfd->name);

        qemu_free(monfd);

        return;

    }



    monitor_printf(VAR_0, "Failed to find file descriptor named %s\n",

                   VAR_2);

}

static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{ const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2"); mon_fd_t *monfd; LIST_FOREACH(monfd, &VAR_0->fds, next) { if (strcmp(monfd->name, VAR_2) != 0) { continue; } LIST_REMOVE(monfd, next); close(monfd->fd); qemu_free(monfd->name); qemu_free(monfd); return; } monitor_printf(VAR_0, "Failed to find file descriptor named %s\n",
VAR_2); }