chiark / gitweb /
rights now apply to commands; docs catch up a bit
[disorder] / server / stats.c
index 0c354e660f87eb2afe38594df47d0235a3ba6fce..44558ebc9da5af774e1164c06b06536eac7cc62a 100644 (file)
@@ -34,6 +34,7 @@
 #include "log.h"
 #include "syscalls.h"
 #include "configuration.h"
+#include "rights.h"
 #include "trackdb.h"
 
 static const struct option options[] = {
@@ -65,7 +66,7 @@ static void help(void) {
 
 /* display version number and terminate */
 static void version(void) {
-  xprintf("disorder-stats version %s\n", disorder_version_string);
+  xprintf("%s", disorder_version_string);
   xfclose(stdout);
   exit(0);
 }
@@ -95,8 +96,8 @@ int main(int argc, char **argv) {
   }
   if(config_read(0))
     fatal(0, "cannot read configuration");
-  trackdb_init(0);
-  trackdb_open(0);
+  trackdb_init(TRACKDB_NO_RECOVER);
+  trackdb_open(TRACKDB_NO_UPGRADE);
   stats = trackdb_stats(0);
   while(*stats)
     xprintf("%s\n", *stats++);