From 8f50ffecedbe9a7dd16ae29354e07924350807f0 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Tue, 14 Feb 2012 13:37:23 +0100 Subject: [PATCH] Fixes --- config/Makefile.am | 2 +- etc/afpd/Makefile.am | 2 +- etc/afpd/afp_options.c | 19 +++++++++---------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/config/Makefile.am b/config/Makefile.am index 5b2b2575..2d0a8580 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -28,7 +28,7 @@ pkgconfdir = @PKGCONFDIR@ # install configuration files # -install-data-local: install-config-files install-webmin +install-data-local: install-config-files uninstall-local: for f in $(CONFFILES) $(GENFILES); do \ diff --git a/etc/afpd/Makefile.am b/etc/afpd/Makefile.am index 747d84f5..8c46abe9 100644 --- a/etc/afpd/Makefile.am +++ b/etc/afpd/Makefile.am @@ -57,7 +57,7 @@ afpd_CFLAGS = \ -DSERVERTEXT=\"$(SERVERTEXT)/\" \ -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" \ -D_PATH_AFPDUAMPATH=\"$(UAMS_PATH)/\" \ - -D_PATH_CONFDIR=\"$(pkgconfdir)\" + -D_PATH_CONFDIR=\"$(pkgconfdir)/\" if HAVE_ACLS afpd_SOURCES += acls.c diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index b4e2306d..17e1706c 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -427,22 +427,21 @@ static void show_paths( void ) /* * Display usage information about afpd. */ -static void show_usage( char *name ) +static void show_usage(void) { - fprintf( stderr, "Usage:\t%s [-duptDTI] [-n nbpname]\n", name ); - fprintf( stderr, "\t [-c maxconnections] [-g guest] [-P pidfile] [-S port] [-L message]\n" ); - fprintf( stderr, "\t [-F configfile] [-U uams] [-m umask]\n" ); - fprintf( stderr, "\t%s -h|-v|-V\n", name ); + fprintf( stderr, "Usage:\tafpd [-d] [-F configfile]\n"); + fprintf( stderr, "\tafpd -h|-v|-V\n"); } void afp_options_parse_cmdline(int ac, char **av) { - char *p; - char *tmp; /* Used for error checking the result of strtol */ int c, err = 0; - while (EOF != ( c = getopt( ac, av, "vVh" )) ) { + while (EOF != ( c = getopt( ac, av, "dFvVh" )) ) { switch ( c ) { + case 'd': + case 'F': + break; case 'v': /* version */ show_version( ); puts( "" ); show_paths( ); puts( "" ); @@ -454,7 +453,7 @@ void afp_options_parse_cmdline(int ac, char **av) exit( 0 ); break; case 'h': /* usage */ - show_usage( p ); + show_usage(); exit( 0 ); break; default : @@ -462,7 +461,7 @@ void afp_options_parse_cmdline(int ac, char **av) } } if ( err || optind != ac ) { - show_usage( p ); + show_usage(); exit( 2 ); } -- 2.39.2