[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver. |
Date: |
Thu, 27 Jun 2013 11:58:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130513 Thunderbird/17.0.6 |
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