]> arthur.barton.de Git - netatalk.git/blobdiff - etc/cnid_dbd/main.c
Remove all Appletalk stuff
[netatalk.git] / etc / cnid_dbd / main.c
index 62ddf9144c703a5fddfad1346132b6a2e1649a92..1c951cb9c6d182c5d238b5de7bf99eb99ae6dbd6 100644 (file)
@@ -8,28 +8,20 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <signal.h>
 #include <string.h>
-#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
 #include <sys/param.h>
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif /* HAVE_SYS_STAT_H */
 #include <time.h>
 #include <sys/file.h>
+#include <arpa/inet.h>
 
-#include <netatalk/endian.h>
 #include <atalk/cnid_dbd_private.h>
 #include <atalk/logger.h>
 #include <atalk/volinfo.h>
@@ -47,7 +39,7 @@
  */
 #define DBOPTIONS (DB_CREATE | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_RECOVER)
 
-/* Global */
+/* Global, needed by pack.c:idxname() */
 struct volinfo volinfo;
 
 static DBD *dbd;
@@ -359,7 +351,7 @@ int main(int argc, char *argv[])
         LOG(log_error, logtype_cnid, "Error loading charsets!");
         exit(EXIT_FAILURE);
     }
-    LOG(log_note, logtype_cnid, "db dir: \"%s\"", dbpath);
+    LOG(log_debug, logtype_cnid, "db dir: \"%s\"", dbpath);
 
     switch_to_user(dbpath);
 
@@ -376,7 +368,7 @@ int main(int argc, char *argv[])
         exit(1);
     LOG(log_maxdebug, logtype_cnid, "Finished parsing db_param config file");
 
-    if (NULL == (dbd = dbif_init(".", "cnid2.db")))
+    if (NULL == (dbd = dbif_init(dbpath, "cnid2.db")))
         exit(2);
 
     if (dbif_env_open(dbd, dbp, DBOPTIONS) < 0)