Add option for config file path
This commit is contained in:
parent
18471ad4c0
commit
0a97f9edc0
|
@ -65,6 +65,9 @@ static void print_help()
|
||||||
/* - - */
|
/* - - */
|
||||||
printf(" -h --help\n");
|
printf(" -h --help\n");
|
||||||
printf(" This help\n");
|
printf(" This help\n");
|
||||||
|
printf(" --config [~/]<path to config file>\n");
|
||||||
|
printf(" Give a config file to use. If it starts with '~/', path is at home dir.\n");
|
||||||
|
printf(" Each line in config file is one option, '-' or '--' must not be given!\n");
|
||||||
printf(" -v --verbose <level> | <level>,<category>[,<category>[,...]] | list\n");
|
printf(" -v --verbose <level> | <level>,<category>[,<category>[,...]] | list\n");
|
||||||
printf(" Use 'list' to get a list of all levels and categories\n");
|
printf(" Use 'list' to get a list of all levels and categories\n");
|
||||||
printf(" Verbose level: digit of debug level (default = '%d')\n", debuglevel);
|
printf(" Verbose level: digit of debug level (default = '%d')\n", debuglevel);
|
||||||
|
@ -308,7 +311,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* handle options / config file */
|
/* handle options / config file */
|
||||||
add_options();
|
add_options();
|
||||||
rc = options_config_file("~/.osmocom/isdn/isdn.conf", handle_options);
|
rc = options_config_file(argc, argv, "~/.osmocom/isdn/isdn.conf", handle_options);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return 0;
|
return 0;
|
||||||
argi = options_command_line(argc, argv, handle_options);
|
argi = options_command_line(argc, argv, handle_options);
|
||||||
|
|
Loading…
Reference in New Issue