chiark / gitweb /
Adjust --version output to more closely match GNU standards
[disorder] / server / deadlock.c
index 99359b261b5980100fab439710a0f5a87755d06d..6aa130cb6d80a4984b1325f54e706a5293e828a0 100644 (file)
@@ -42,6 +42,7 @@
 #include "rights.h"
 #include "trackdb.h"
 #include "trackdb-int.h"
+#include "version.h"
 
 static const struct option options[] = {
   { "help", no_argument, 0, 'h' },
@@ -71,13 +72,6 @@ static void help(void) {
   exit(0);
 }
 
-/* display version number and terminate */
-static void version(void) {
-  xprintf("%s", disorder_version_string);
-  xfclose(stdout);
-  exit(0);
-}
-
 int main(int argc, char **argv) {
   int n, err, aborted, logsyslog = !isatty(2);
 
@@ -86,7 +80,7 @@ int main(int argc, char **argv) {
   while((n = getopt_long(argc, argv, "hVc:dDSs", options, 0)) >= 0) {
     switch(n) {
     case 'h': help();
-    case 'V': version();
+    case 'V': version("disorder-deadlock");
     case 'c': configfile = optarg; break;
     case 'd': debugging = 1; break;
     case 'D': debugging = 0; break;