void monitor_init(CharDriverState *hd, int show_banner)

{

    int i;



    if (is_first_init) {

        key_timer = qemu_new_timer(vm_clock, release_keys, NULL);

        if (!key_timer)

            return;

        for (i = 0; i < MAX_MON; i++) {

            monitor_hd[i] = NULL;

        }

        is_first_init = 0;

    }

    for (i = 0; i < MAX_MON; i++) {

        if (monitor_hd[i] == NULL) {

            monitor_hd[i] = hd;

            break;

        }

    }



    hide_banner = !show_banner;



    qemu_chr_add_handlers(hd, term_can_read, term_read, term_event, NULL);



    readline_start("", 0, monitor_handle_command1, NULL);

}

void monitor_init(CharDriverState *hd, int show_banner)

{

    int i;



    if (is_first_init) {

        key_timer = qemu_new_timer(vm_clock, release_keys, NULL);

        if (!key_timer)

            return;

        for (i = 0; i < MAX_MON; i++) {

            monitor_hd[i] = NULL;

        }

        is_first_init = 0;

    }

    for (i = 0; i < MAX_MON; i++) {

        if (monitor_hd[i] == NULL) {

            monitor_hd[i] = hd;

            break;

        }

    }



    hide_banner = !show_banner;



    qemu_chr_add_handlers(hd, term_can_read, term_read, term_event, NULL);



    readline_start("", 0, monitor_handle_command1, NULL);

}

void FUNC_0(CharDriverState *VAR_0, int VAR_1)

{

    int VAR_2;



    if (is_first_init) {

        key_timer = qemu_new_timer(vm_clock, release_keys, NULL);

        if (!key_timer)

            return;

        for (VAR_2 = 0; VAR_2 < MAX_MON; VAR_2++) {

            monitor_hd[VAR_2] = NULL;

        }

        is_first_init = 0;

    }

    for (VAR_2 = 0; VAR_2 < MAX_MON; VAR_2++) {

        if (monitor_hd[VAR_2] == NULL) {

            monitor_hd[VAR_2] = VAR_0;

            break;

        }

    }



    hide_banner = !VAR_1;



    qemu_chr_add_handlers(VAR_0, term_can_read, term_read, term_event, NULL);



    readline_start("", 0, monitor_handle_command1, NULL);

}

void FUNC_0(CharDriverState *VAR_0, int VAR_1)
{ int VAR_2; if (is_first_init) { key_timer = qemu_new_timer(vm_clock, release_keys, NULL); if (!key_timer)
return; for (VAR_2 = 0; VAR_2 < MAX_MON; VAR_2++) { monitor_hd[VAR_2] = NULL; } is_first_init = 0; } for (VAR_2 = 0; VAR_2 < MAX_MON; VAR_2++) { if (monitor_hd[VAR_2] == NULL) { monitor_hd[VAR_2] = VAR_0; break; } } hide_banner = !VAR_1; qemu_chr_add_handlers(VAR_0, term_can_read, term_read, term_event, NULL); readline_start("", 0, monitor_handle_command1, NULL); }