Hi, > Thanks for this code. Is this how I should display the Serial console?
> void myDisplaySerialConsole() > { > QemuConsole *con; > char *name; > int index = 0; > > con = qemu_console_lookup_by_index(0); > while(con != NULL) { > name = qemu_console_get_label(con); > > /* If we found the console */ > if (strstr(name, "Serial")) { > console_select(index); > break; > } > index++; > con = qemu_console_lookup_by_index(index); This mixes up several things. When initializing the UI you'll loop over the consoles, like this: QemuConsole *con; int i; for (i = 0;; i++) { con = qemu_console_lookup_by_index(i); if (!con) { break; } /* * add a menu entry for the console here, * using qemu_console_get_label() to get * the text for the menu entry */ } When the menu entry is activated by the user use console_select() to switch. cheers, Gerd