From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us8yk-0004Ec-2z for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:59:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Us8yj-0007AB-6K for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:59:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us8yi-0007A6-Vk for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:59:01 -0400 Message-ID: <51CC0CE1.9030008@redhat.com> Date: Thu, 27 Jun 2013 11:58:57 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1372246684-12499-1-git-send-email-kraxel@redhat.com> <20130626114834.08d81459@redhat.com> In-Reply-To: <20130626114834.08d81459@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 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: Luiz Capitulino Cc: Anthony Liguori , qemu-devel@nongnu.org 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? >> + 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() ;) cheers, Gerd