From 319719b095cd36dd2083089c7fdfe1515ecdaa6e Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 14 Mar 2021 11:16:49 +0100 Subject: Add option to change config path --- src/ss5/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 [~/]\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); @@ -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); -- cgit v1.2.3