diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-20 17:35:06 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-20 17:35:06 -0400 |
commit | f2f1f2472c5efc541bd53f51289ad58a86fa2d41 (patch) | |
tree | 42807ddc64ab0672744c716d9f952e5673762b9d /src/udev/v4l_id | |
parent | 3eed542bbc10978aa0b68a39dd3619edf7a7d90b (diff) |
./tools/notsd-move
Diffstat (limited to 'src/udev/v4l_id')
l--------- | src/udev/v4l_id/Makefile | 1 | ||||
-rw-r--r-- | src/udev/v4l_id/v4l_id.c | 86 |
2 files changed, 0 insertions, 87 deletions
diff --git a/src/udev/v4l_id/Makefile b/src/udev/v4l_id/Makefile deleted file mode 120000 index d0b0e8e008..0000000000 --- a/src/udev/v4l_id/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile
\ No newline at end of file diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c deleted file mode 100644 index aec6676a33..0000000000 --- a/src/udev/v4l_id/v4l_id.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2009 Kay Sievers <kay@vrfy.org> - * Copyright (c) 2009 Filippo Argiolas <filippo.argiolas@gmail.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details: - */ - -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <getopt.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/ioctl.h> -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> -#include <linux/videodev2.h> - -#include "fd-util.h" -#include "util.h" - -int main(int argc, char *argv[]) { - static const struct option options[] = { - { "help", no_argument, NULL, 'h' }, - {} - }; - _cleanup_close_ int fd = -1; - char *device; - struct v4l2_capability v2cap; - int c; - - while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) - - switch (c) { - case 'h': - printf("%s [-h,--help] <device file>\n\n" - "Video4Linux device identification.\n\n" - " -h Print this message\n" - , program_invocation_short_name); - return 0; - case '?': - return -EINVAL; - - default: - assert_not_reached("Unhandled option"); - } - - device = argv[optind]; - if (device == NULL) - return 2; - - fd = open(device, O_RDONLY); - if (fd < 0) - return 3; - - if (ioctl(fd, VIDIOC_QUERYCAP, &v2cap) == 0) { - printf("ID_V4L_VERSION=2\n"); - printf("ID_V4L_PRODUCT=%s\n", v2cap.card); - printf("ID_V4L_CAPABILITIES=:"); - if ((v2cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) > 0) - printf("capture:"); - if ((v2cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) > 0) - printf("video_output:"); - if ((v2cap.capabilities & V4L2_CAP_VIDEO_OVERLAY) > 0) - printf("video_overlay:"); - if ((v2cap.capabilities & V4L2_CAP_AUDIO) > 0) - printf("audio:"); - if ((v2cap.capabilities & V4L2_CAP_TUNER) > 0) - printf("tuner:"); - if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0) - printf("radio:"); - printf("\n"); - } - - return 0; -} |