]> arthur.barton.de Git - netatalk.git/blobdiff - etc/cnid_dbd/main.c
Merge master
[netatalk.git] / etc / cnid_dbd / main.c
index e2f8e98e8fca82e400e39a0cb3ceb61af54df628..55bbcddbb100c3b34fb34f5355d965c00bc6b3f0 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>
@@ -288,8 +280,12 @@ int main(int argc, char *argv[])
 
     set_processname("cnid_dbd");
 
-    while (( ret = getopt( argc, argv, "d")) != -1 ) {
+    while (( ret = getopt( argc, argv, "vVd")) != -1 ) {
         switch (ret) {
+        case 'v':
+        case 'V':
+            printf("cnid_dbd (Netatalk %s)\n", VERSION);
+            return -1;
         case 'd':
             delete_bdb = 1;
             break;