On 24 January 2015 at 01:56, Programmingkid <programmingk...@gmail.com> wrote: > This patch adds these consoles to the View menu: > VGA > QEMU Monitor > Parallel > Serial > > Signed-off-by: John Arbuckle <programmingk...@gmail.com>
> +/* Displays the VGA screen */ > +- (void)displayVGA:(id)sender > +{ > + console_select(0); > +} > + > +/* Displays the QEMU Monitor screen */ > +- (void)displayMonitor:(id)sender > +{ > + console_select(1); > +} > + > +/* Displays the parallel port screen */ > +- (void)displayParallel:(id)sender > +{ > + console_select(3); > +} > + > +/* Displays the serial port screen */ > +- (void)displaySerial:(id)sender > +{ > + console_select(2); > +} I'm afraid this doesn't work, because there's no guarantee that these consoles will be created or in this order. They just happen to be the set you get for the x86 PC model. If you boot a versatilepb ARM image with the serial output directed to stdio, for instance, then the "serial" entry in the menu gets you the parallel port console, and the parallel port entry does nothing, because this board and config happens to end up creating only 3 consoles, not 4 (graphics, monitor, parallel). We're going to need to automatically create and update the menu entries based on which consoles get created if we want this to work properly, I think. Gerd, any suggestions? Is there a hook for "list of active consoles has changed"? What's the right way to get the printable name of a console? thanks -- PMM