summaryrefslogtreecommitdiff
path: root/src/udev/fido_id
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/fido_id')
-rw-r--r--src/udev/fido_id/fido_id.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/udev/fido_id/fido_id.c b/src/udev/fido_id/fido_id.c
index 11f5320d2b..e01f37d04c 100644
--- a/src/udev/fido_id/fido_id.c
+++ b/src/udev/fido_id/fido_id.c
@@ -15,6 +15,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "build.h"
#include "device-private.h"
#include "device-util.h"
#include "fd-util.h"
@@ -30,7 +31,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;
@@ -39,9 +41,12 @@ static int parse_argv(int argc, char *argv[]) {
switch (c) {
case 'h':
printf("%s [OPTIONS...] SYSFS_PATH\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: