summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2021-03-14 11:16:49 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2021-03-14 11:16:49 +0100
commit319719b095cd36dd2083089c7fdfe1515ecdaa6e (patch)
treedc73d2e2a951140b58a446426d82221437d4b71e
parent4e45d95012a8d0bbd6161e276885e79b2a775745 (diff)
Add option to change config path
-rw-r--r--src/ss5/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ss5/main.c b/src/ss5/main.c
index 1e0367e..76714db 100644
--- a/src/ss5/main.c
+++ b/src/ss5/main.c
@@ -63,6 +63,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);
@@ -235,7 +238,7 @@ int main(int argc, char *argv[])
/* handle options / config file */
add_options();
- rc = options_config_file("~/.osmocom/ss5/ss5.conf", handle_options);
+ rc = options_config_file(argc, argv, "~/.osmocom/ss5/ss5.conf", handle_options);
if (rc < 0)
return 0;
argi = options_command_line(argc, argv, handle_options);