]> arthur.barton.de Git - netatalk.git/blobdiff - etc/atalkd/main.c
added version reporting for the main daemons with a -v switch
[netatalk.git] / etc / atalkd / main.c
index 64f81948d09f9a96b73c5fceef2024c5b9cf2803..ae4fa9a654d2c7ef51ed11e77b7f2e77507a5590 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.8 2001-09-06 19:04:39 rufustfirefly Exp $
+ * $Id: main.c,v 1.9 2001-09-10 18:27:14 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -862,7 +862,7 @@ int main( ac, av )
     char               *prog;
 ;
 
-    while (( c = getopt( ac, av, "12qsdtf:P:" )) != EOF ) {
+    while (( c = getopt( ac, av, "12qsdtf:P:v" )) != EOF ) {
        switch ( c ) {
        case '1' :
            defphase = IFACE_PHASE1;
@@ -896,6 +896,11 @@ int main( ac, av )
            pidfile = optarg;
            break;
 
+       case 'v' :      /* version */
+           printf( 'atalkd (version %s)\n', version );
+           exit ( 1 );
+           break;
+
        default :
            fprintf( stderr, "Unknown option -- '%c'\n", c );
            exit( 1 );