change -l' flag to use arg_collect (this makes -ll' work again)

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7186 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1999-10-18 17:19:14 +00:00
parent 386db3e8b0
commit ecf66fc91e

View File

@@ -208,12 +208,25 @@ int use_builtin_ls;
static int help_flag;
static int version_flag;
static int
log_collect(int short_flag, int argc, char **argv,
int *optind, int *optarg, void *data)
{
(*(int*)data)++;
return 0;
}
static getarg_collect_info log_collect_info = {
log_collect,
&logflag
};
struct getargs args[] = {
{ NULL, 'a', arg_string, &auth_string, "required authentication" },
{ NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" },
{ NULL, 'p', arg_string, &port_string, "what port to listen to" },
{ NULL, 'g', arg_string, &guest_umask_string, "umask for guest logins" },
{ NULL, 'l', arg_flag, &logflag, "log more stuff" },
{ NULL, 'l', arg_collect, &log_collect_info, "log more stuff", "" },
{ NULL, 't', arg_integer, &ftpd_timeout, "initial timeout" },
{ NULL, 'T', arg_integer, &maxtimeout, "max timeout" },
{ NULL, 'u', arg_string, &umask_string, "umask for user logins" },
@@ -236,7 +249,7 @@ usage (int code)
int
main(int argc, char **argv)
{
int addrlen, ch, on = 1, tos;
int addrlen, on = 1, tos;
char *cp, line[LINE_MAX];
FILE *fd;
int port;
@@ -259,7 +272,7 @@ main(int argc, char **argv)
#endif
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)
usage(0);