From 0a97f9edc01332a8c9f5f2a5e21199fb1f1c4518 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 14 Mar 2021 11:13:04 +0100 Subject: [PATCH] Add option for config file path --- src/isdn/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 [~/]\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 | ,[,[,...]] | 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);