DisplayState *init_displaystate(void)

{

    gchar *name;

    int i;



    if (!display_state) {

        display_state = g_new0(DisplayState, 1);

    }



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

        if (consoles[i]->console_type != GRAPHIC_CONSOLE &&

            consoles[i]->ds == NULL) {

            text_console_do_init(consoles[i]->chr, display_state);

        }



        /* Hook up into the qom tree here (not in new_console()), once

         * all QemuConsoles are created and the order / numbering

         * doesn't change any more */

        name = g_strdup_printf("console[%d]", i);

        object_property_add_child(container_get(object_get_root(), "/backend"),

                                  name, OBJECT(consoles[i]), &error_abort);

        g_free(name);

    }



    return display_state;

}

DisplayState *init_displaystate(void)

{

    gchar *name;

    int i;



    if (!display_state) {

        display_state = g_new0(DisplayState, 1);

    }



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

        if (consoles[i]->console_type != GRAPHIC_CONSOLE &&

            consoles[i]->ds == NULL) {

            text_console_do_init(consoles[i]->chr, display_state);

        }



        





        name = g_strdup_printf("console[%d]", i);

        object_property_add_child(container_get(object_get_root(), "/backend"),

                                  name, OBJECT(consoles[i]), &error_abort);

        g_free(name);

    }



    return display_state;

}

    if (!display_state) {         display_state = g_new0(DisplayState, 1);
DisplayState *FUNC_0(void)

{

    gchar *name;

    int VAR_0;



    if (!display_state) {

        display_state = g_new0(DisplayState, 1);

    }



    for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) {

        if (consoles[VAR_0]->console_type != GRAPHIC_CONSOLE &&

            consoles[VAR_0]->ds == NULL) {

            text_console_do_init(consoles[VAR_0]->chr, display_state);

        }



        





        name = g_strdup_printf("console[%d]", VAR_0);

        object_property_add_child(container_get(object_get_root(), "/backend"),

                                  name, OBJECT(consoles[VAR_0]), &error_abort);

        g_free(name);

    }



    return display_state;

}

DisplayState *FUNC_0(void)
{ gchar *name; int VAR_0; if (!display_state) { display_state = g_new0(DisplayState, 1); } for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) { if (consoles[VAR_0]->console_type != GRAPHIC_CONSOLE &&
consoles[VAR_0]->ds == NULL) { text_console_do_init(consoles[VAR_0]->chr, display_state); } name = g_strdup_printf("console[%d]", VAR_0); object_property_add_child(container_get(object_get_root(), "/backend"),
name, OBJECT(consoles[VAR_0]), &error_abort); g_free(name); } return display_state; }