chiark / gitweb /
extras/keymap/findkeyboards: Filter out non-event devices
[elogind.git] / extras / v4l_id / v4l_id.c
index 59b4f2f737e54e38b910961293dce7e88932d6fe..21cb3285ad7a984dd41112e1013c3843c92a930c 100644 (file)
@@ -28,7 +28,6 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
-#include <linux/videodev.h>
 #include <linux/videodev2.h>
 
 int main (int argc, char *argv[])
@@ -39,7 +38,6 @@ int main (int argc, char *argv[])
        };
        int fd;
        char *device;
-       struct video_capability v1cap;
        struct v4l2_capability v2cap;
 
        while (1) {
@@ -52,6 +50,7 @@ int main (int argc, char *argv[])
                switch (option) {
                case 'h':
                        printf("Usage: v4l_id [--help] <device file>\n\n");
+                       return 0;
                default:
                        return 1;
                }
@@ -81,19 +80,6 @@ int main (int argc, char *argv[])
                if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0)
                        printf("radio:");
                printf("\n");
-       } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
-               printf("ID_V4L_VERSION=1\n");
-               printf("ID_V4L_PRODUCT=%s\n", v1cap.name);
-               printf("ID_V4L_CAPABILITIES=:");
-               if ((v1cap.type & VID_TYPE_CAPTURE) > 0)
-                       printf("capture:");
-               if ((v1cap.type & VID_TYPE_OVERLAY) > 0)
-                       printf("video_overlay:");
-               if (v1cap.audios > 0)
-                       printf("audio:");
-               if ((v1cap.type & VID_TYPE_TUNER) > 0)
-                       printf("tuner:");
-               printf("\n");
        }
 
        close (fd);