X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=adu.c;h=1aaea35900d67a89163d51625dee4425fc36354e;hb=677f261ca511c8976e2945b34b9d08f06b0ce1d1;hp=8c84c82639e57f57549652fae3ac0aa4123d2789;hpb=1ae30c7805ddf80e6e5eb59d9332886e2a8d2640;p=adu.git diff --git a/adu.c b/adu.c index 8c84c82..1aaea35 100644 --- a/adu.c +++ b/adu.c @@ -2,6 +2,7 @@ #include /* readdir() */ #include "gcc-compat.h" +#include "cmdline.h" #include "osl.h" #include "fd.h" #include "hash.h" @@ -13,6 +14,9 @@ DEFINE_ERRLIST; #define DATABASE_DIR "/tmp/adu" #define UID_LIST DATABASE_DIR "/" "uid_list" +/** Command line and config file options. */ +static struct gengetopt_args_info conf; + struct user_info { uint32_t uid; struct osl_table *table; @@ -807,6 +811,15 @@ static int com_select(void) int main(int argc, char **argv) { int ret = -E_SYNTAX; + struct cmdline_parser_params params = { + .override = 0, + .initialize = 1, + .check_required = 0, + .check_ambiguity = 0, + .print_errors = 1 + }; + + cmdline_parser_ext(argc, argv, &conf, ¶ms); /* aborts on errors */ if (argc > 2) goto out; if (argc == 1)