]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/tty-ask-password-agent/tty-ask-password-agent.c
util: introduce common version() implementation and use it everywhere
[thirdparty/systemd.git] / src / tty-ask-password-agent / tty-ask-password-agent.c
index 82cbf95f1e974d6133cf8773bcabed445de712c7..3c1346fddb8e9ab9026c7756c829e73bf7f65d6d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdbool.h>
 #include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <poll.h>
+#include <stdbool.h>
+#include <stddef.h>
 #include <string.h>
+#include <sys/inotify.h>
+#include <sys/signalfd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#include <stddef.h>
-#include <poll.h>
-#include <sys/inotify.h>
 #include <unistd.h>
-#include <getopt.h>
-#include <sys/signalfd.h>
-#include <fcntl.h>
 
-#include "util.h"
+#include "ask-password-api.h"
+#include "conf-parser.h"
+#include "def.h"
 #include "mkdir.h"
 #include "path-util.h"
-#include "conf-parser.h"
-#include "utmp-wtmp.h"
+#include "process-util.h"
+#include "signal-util.h"
 #include "socket-util.h"
-#include "ask-password-api.h"
 #include "strv.h"
-#include "build.h"
-#include "def.h"
-#include "process-util.h"
 #include "terminal-util.h"
-#include "signal-util.h"
+#include "util.h"
+#include "utmp-wtmp.h"
 
 static enum {
         ACTION_LIST,
@@ -571,9 +570,7 @@ static int parse_argv(int argc, char *argv[]) {
                         return 0;
 
                 case ARG_VERSION:
-                        puts(PACKAGE_STRING);
-                        puts(SYSTEMD_FEATURES);
-                        return 0;
+                        return version();
 
                 case ARG_LIST:
                         arg_action = ACTION_LIST;