From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj5iA-0006aY-V2 for qemu-devel@nongnu.org; Wed, 20 Nov 2013 06:12:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vj5i4-000867-E4 for qemu-devel@nongnu.org; Wed, 20 Nov 2013 06:12:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj5i4-00085v-5w for qemu-devel@nongnu.org; Wed, 20 Nov 2013 06:12:40 -0500 Message-ID: <1384945955.2005.84.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 20 Nov 2013 12:12:35 +0100 In-Reply-To: <1384926761-9962-4-git-send-email-airlied@gmail.com> References: <1384926761-9962-1-git-send-email-airlied@gmail.com> <1384926761-9962-4-git-send-email-airlied@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/8] console: add information retrival wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Airlie Cc: qemu-devel@nongnu.org Hi, > +int qemu_get_console_index(QemuConsole *con); Makes sense to have that. There are other retrival wrappers already (qemu_console_is_*). I'd like to see the new one placed next to the others, and follow the name convention (i.e. use qemu_console_get_index). > +int qemu_get_number_graphical_consoles(void); Hmm, what is bad with qemu_console_is_graphic? Patch #5 uses it to loop over the gfx consoles. As the code doesn't need to know the number of consoles in advance you can do this instead (like spice): for (i = 0;; i++) { con = qemu_console_lookup_by_index(i); if (!con || !qemu_console_is_graphic(con)) { break; } [ ... ] } cheers, Gerd