summaryrefslogtreecommitdiff
path: root/src/udev/v4l_id/v4l_id.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/v4l_id/v4l_id.c')
-rw-r--r--src/udev/v4l_id/v4l_id.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
index 98075db0ce..1d176a387e 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/udev/v4l_id/v4l_id.c
@@ -26,6 +26,7 @@
#include <unistd.h>
#include <linux/videodev2.h>
+#include "build.h"
#include "fd-util.h"
#include "main-func.h"
@@ -33,7 +34,8 @@ static const char *arg_device = NULL;
static int parse_argv(int argc, char *argv[]) {
static const struct option options[] = {
- { "help", no_argument, NULL, 'h' },
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, 'v' },
{}
};
int c;
@@ -43,9 +45,12 @@ static int parse_argv(int argc, char *argv[]) {
case 'h':
printf("%s [OPTIONS...] DEVICE\n\n"
"Video4Linux device identification.\n\n"
- " -h --help Show this help text\n",
+ " -h --help Show this help text\n"
+ " --version Show package version\n",
program_invocation_short_name);
return 0;
+ case 'v':
+ return version();
case '?':
return -EINVAL;
default: