]> arthur.barton.de Git - netatalk.git/blobdiff - bin/megatron/megatron.c
Merge remote-tracking branch 'origin/develop' into spotlight
[netatalk.git] / bin / megatron / megatron.c
index 1dc83d777c0991e5f4d7a85b911930f63b6143f8..573a3dc88696c408e92a2173687cec417c978107 100644 (file)
@@ -1,7 +1,3 @@
-/*
- * $Id: megatron.c,v 1.14 2010-01-27 21:27:53 didg Exp $
- */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
@@ -10,9 +6,7 @@
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/uio.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
 #include <time.h>
 #include <ctype.h>
 #include <stdio.h>
@@ -309,6 +303,14 @@ int main(int argc, char **argv)
 
     *newname = '\0';
     for ( c = 1 ; c < argc ; ++c ) {
+        if ( strcmp( argv [ c ], "--version" ) == 0 ) {
+           printf("%s (Netatalk %s megatron)\n", argv[0], VERSION);
+           return( -1 );
+       }
+        if ( strcmp( argv [ c ], "-v" ) == 0 ) {
+           printf("%s (Netatalk %s megatron)\n", argv[0], VERSION);
+           return( -1 );
+       }
         if ( strcmp( argv [ c ], "--header" ) == 0 ) {
            flags |= OPTION_HEADERONLY;
            continue;
@@ -337,4 +339,3 @@ int main(int argc, char **argv)
     }
     return( rv );
 }
-