chiark / gitweb /
Remove some obsolete code
[disorder] / server / dbupgrade.c
index b856ae5eb36ba312915b5afde9f218da4b27ca93..f972b5984f25e5746e6fef8274fc5b9c7388106b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder
- * Copyright (C) 2007 Richard Kettlewell
+ * Copyright (C) 2007, 2008 Richard Kettlewell
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include "log.h"
 #include "defs.h"
 #include "kvp.h"
+#include "rights.h"
 #include "trackdb.h"
 #include "trackdb-int.h"
 #include "mem.h"
 #include "configuration.h"
 #include "unicode.h"
+#include "version.h"
 
 static DB_TXN *global_tid;
 
@@ -84,13 +86,6 @@ static void help(void) {
   exit(0);
 }
 
-/* display version number and terminate */
-static void version(void) {
-  xprintf("disorder-dbupgrade version %s\n", disorder_version_string);
-  xfclose(stdout);
-  exit(0);
-}
-
 /** @brief Visit each key in a database and call @p callback
  * @return 0 or DB_LOCK_DEADLOCK
  *
@@ -342,7 +337,7 @@ int main(int argc, char **argv) {
   while((n = getopt_long(argc, argv, "hVc:dDSsxX", options, 0)) >= 0) {
     switch(n) {
     case 'h': help();
-    case 'V': version();
+    case 'V': version("disorder-dbupgrade");
     case 'c': configfile = optarg; break;
     case 'd': debugging = 1; break;
     case 'D': debugging = 0; break;