Added the ability to specify database page size.
[statserve.git] / statserve.c
index ed49388..ab3b346 100644 (file)
@@ -59,7 +59,7 @@ out:
 
 static void usage(FILE *out)
 {
-    fprintf(out, "usage: statserve [-h] SOURCE...\n");
+    fprintf(out, "usage: statserve [-h] [-P PAGESIZE] SOURCE...\n");
 }
 
 static void listenloop(struct muth *muth, va_list args)
@@ -89,8 +89,11 @@ int main(int argc, char **argv)
     int c;
     struct source *last, *src;
     
-    while((c = getopt(argc, argv, "+h")) >= 0) {
+    while((c = getopt(argc, argv, "+hP:")) >= 0) {
        switch(c) {
+       case 'P':
+           dbpagesize = atoi(optarg);
+           break;
        case 'h':
            usage(stdout);
            return(0);