From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM1r3-0007Ce-Ap for qemu-devel@nongnu.org; Thu, 12 Feb 2015 17:03:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM1qx-000265-CU for qemu-devel@nongnu.org; Thu, 12 Feb 2015 17:03:25 -0500 Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]:63672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM1qx-00025q-93 for qemu-devel@nongnu.org; Thu, 12 Feb 2015 17:03:19 -0500 Received: by mail-qc0-f174.google.com with SMTP id i8so11130774qcq.5 for ; Thu, 12 Feb 2015 14:03:19 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Thu, 12 Feb 2015 17:03:16 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <2DA64DB0-EE3A-468B-A2FB-0650DF58A2A3@gmail.com> References: <82FF5E7D-9716-476C-BBA5-56223DCB6023@gmail.com> Subject: Re: [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel , Gerd Hoffmann On Feb 11, 2015, at 10:39 PM, Peter Maydell wrote: > On 24 January 2015 at 01:56, Programmingkid = wrote: >> This patch adds these consoles to the View menu: >> VGA >> QEMU Monitor >> Parallel >> Serial >>=20 >> Signed-off-by: John Arbuckle >=20 >> +/* 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); >> +} >=20 > 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). >=20 > 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? Do you know where the code is that creates the consoles?=20=