summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2021-03-14 11:13:04 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2021-03-14 11:13:04 +0100
commit0a97f9edc01332a8c9f5f2a5e21199fb1f1c4518 (patch)
tree8ab6b561e9a423d8ebb1117ee25de045e088ee5a
parent18471ad4c0282dbf76fe324463372195448a6c86 (diff)
Add option for config file path
-rw-r--r--src/isdn/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/isdn/main.c b/src/isdn/main.c
index e49a287..99f5505 100644
--- a/src/isdn/main.c
+++ b/src/isdn/main.c
@@ -65,6 +65,9 @@ static void print_help()
/* - - */
printf(" -h --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(" Use 'list' to get a list of all levels and categories\n");
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 */
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)
return 0;
argi = options_command_line(argc, argv, handle_options);