lavd/fbdev_common: report error during probing fbdev device
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sat, 18 Oct 2014 18:22:35 +0000 (20:22 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Tue, 21 Oct 2014 20:57:32 +0000 (22:57 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavdevice/fbdev_common.c

index 634780d..713e4fd 100644 (file)
@@ -84,8 +84,13 @@ int ff_fbdev_get_device_list(AVDeviceInfoList *device_list)
     for (i = 0; i <= 31; i++) {
         snprintf(device_file, sizeof(device_file), "/dev/fb%d", i);
 
-        if ((fd = avpriv_open(device_file, O_RDWR)) < 0)
+        if ((fd = avpriv_open(device_file, O_RDWR)) < 0) {
+            int err = AVERROR(errno);
+            if (err != AVERROR(ENOENT))
+                av_log(NULL, AV_LOG_ERROR, "Could not open framebuffer device '%s': %s\n",
+                       device_file, av_err2str(err));
             continue;
+        }
         if (ioctl(fd, FBIOGET_VSCREENINFO, &varinfo) == -1)
             goto fail_device;
         if (ioctl(fd, FBIOGET_FSCREENINFO, &fixinfo) == -1)