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


Reply via email to