+ int optchar;
+ char *configfile = NULL;
+ struct onak_dbctx *dbctx;
+
+ while ((optchar = getopt(argc, argv, "c:")) != -1 ) {
+ switch (optchar) {
+ case 'c':
+ if (configfile != NULL) {
+ free(configfile);
+ }
+ configfile = strdup(optarg);
+ break;
+ }
+ }
+
+ readconfig(configfile);
+ free(configfile);
+ initlogthing("maxpath", config.logfile);
+ dbctx = config.dbinit(config.backend, true);
+ if (dbctx != NULL) {
+ inithash();
+ findmaxpath(dbctx, 30);
+ printf("--------\n");
+ findmaxpath(dbctx, 30);
+ destroyhash();
+ dbctx->cleanupdb(dbctx);
+ } else {
+ fprintf(stderr, "Couldn't initialize key database.\n");
+ }
+ cleanuplogthing();