summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 0dec0629c0..2e74a25972 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -40,6 +40,7 @@
#include "socket-util.h"
#include "ask-password-api.h"
#include "strv.h"
+#include "build.h"
static enum {
ACTION_LIST,
@@ -638,6 +639,7 @@ static int help(void) {
printf("%s [OPTIONS...]\n\n"
"Process system password requests.\n\n"
" -h --help Show this help\n"
+ " --version Show package version\n"
" --list Show pending password requests\n"
" --query Process pending password requests\n"
" --watch Continuously process password requests\n"
@@ -657,11 +659,13 @@ static int parse_argv(int argc, char *argv[]) {
ARG_WATCH,
ARG_WALL,
ARG_PLYMOUTH,
- ARG_CONSOLE
+ ARG_CONSOLE,
+ ARG_VERSION
};
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, ARG_VERSION },
{ "list", no_argument, NULL, ARG_LIST },
{ "query", no_argument, NULL, ARG_QUERY },
{ "watch", no_argument, NULL, ARG_WATCH },
@@ -684,6 +688,12 @@ static int parse_argv(int argc, char *argv[]) {
help();
return 0;
+ case ARG_VERSION:
+ puts(PACKAGE_STRING);
+ puts(DISTRIBUTION);
+ puts(SYSTEMD_FEATURES);
+ return 0;
+
case ARG_LIST:
arg_action = ACTION_LIST;
break;