On 11 May 2015 at 01:32, Programmingkid <programmingk...@gmail.com> wrote:
> This patch adds the VGA, Monitor, Serial, and Parallel menu item to the view
> menu.
>
> Signed-off-by: John Arbuckle <programmingk...@gmail.com>

> +    // set the console variables for the consoles we have
> +    while(qemu_console_lookup_by_index(index) != NULL) {
> +        console_name =
> qemu_console_get_label(qemu_console_lookup_by_index(index));
> +        if(strstr(console_name, "VGA") != NULL) {
> +            graphics_console = index;
> +        } else if (strstr(console_name, "monitor") != NULL) {
> +            monitor_console = index;
> +        } else if (strstr(console_name, "serial") != NULL) {
> +            serial_console = index;
> +        } else if (strstr(console_name, "parallel") != NULL) {
> +            parallel_console = index;
> +        } else {
> +            printf("Error in initConsoleVariables(): given value %s\n",
> console_name);

Can't we just create a menu with an item for every console,
and set its menu text to the result of qemu_console_get_label() ?
I don't see why we need to special case these four and only
display those.

thanks
-- PMM

Reply via email to