From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCAb-0003Hx-Hp for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:23:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsCAa-0007y7-79 for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:23:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCAZ-0007xw-Vw for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:23:28 -0400 Date: Thu, 27 Jun 2013 09:23:25 -0400 From: Luiz Capitulino Message-ID: <20130627092325.291d0ac5@redhat.com> In-Reply-To: <51CC0CE1.9030008@redhat.com> References: <1372246684-12499-1-git-send-email-kraxel@redhat.com> <20130626114834.08d81459@redhat.com> <51CC0CE1.9030008@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Anthony Liguori , qemu-devel@nongnu.org On Thu, 27 Jun 2013 11:58:57 +0200 Gerd Hoffmann wrote: > Hi, > > >> + /* open framebuffer */ > >> + if (device == NULL) { > >> + device = getenv("FRAMEBUFFER"); > >> + } > >> + if (device == NULL) { > >> + device = "/dev/fb0"; > >> + } > > > > Maybe this is a matter of taste, but I think that having this logic at > > this layer makes the API harder to use. What about moving this to the > > call in vl.c and making the device name required in QMP? > > I'll just drop the getenv. That will make "/dev/fb0" the default value > no matter what. Ok? I still prefer having no defaults in QMP (it's ok elsewhere, like HMP), but I won't nack the patch of that. > >> + s->fb = open(device, O_RDWR); > >> + if (s->fb == -1) { > >> + error_setg(err, "open %s: %s\n", device, strerror(errno)); > > > > We have error_setg_errno() :) > > Also error_setg_file_open() ;) Oh, I really forgot about it...