]> code.citadel.org Git - citadel.git/blobdiff - citadel/server_main.c
* if -D added, citserver will print out the Directories.
[citadel.git] / citadel / server_main.c
index 80a71cc992a3bf70c35d457f285b2f70a75ab701..f8b95019d2f96991213c0bd9ef1db8b661b0b705 100644 (file)
@@ -84,6 +84,7 @@ int main(int argc, char **argv)
        size_t size;
        int relh=0;
        int home=0;
+       int dbg=0;
        char relhome[PATH_MAX]="";
        char ctdldir[PATH_MAX]=CTDLDIR;
 #ifdef HAVE_RUN_DIR
@@ -140,6 +141,10 @@ int main(int argc, char **argv)
                        do_defrag = 1;
                }
 
+               else if (!strncmp(argv[a], "-D", 2)) {
+                       dbg = 1;
+               }
+
                /* -r tells the server not to drop root permissions. don't use
                 * this unless you know what you're doing. this should be
                 * removed in the next release if it proves unnecessary. */
@@ -151,7 +156,7 @@ int main(int argc, char **argv)
                        lprintf(CTDL_EMERG,     "citserver: usage: "
                                        "citserver "
                                        "[-lLogFacility] "
-                                       "[-d] [-f]"
+                                       "[-d] [-f] [-D] "
                                        " [-tTraceFile]"
                                        " [-xLogLevel] [-hHomeDir]\n");
                        exit(1);
@@ -159,7 +164,7 @@ int main(int argc, char **argv)
 
        }
 
-       calc_dirs_n_files(relh, home, relhome, ctdldir);
+       calc_dirs_n_files(relh, home, relhome, ctdldir, dbg);
        /* daemonize, if we were asked to */
        if (running_as_daemon) {
                start_daemon(0);