From db7078dccaf52899c6de7a9790264acffd331d17 Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 1 Nov 2024 16:50:04 +0300 Subject: [PATCH] nfqws,tpws: use alternate $ sign to indicate file config --- nfq/nfqws.c | 4 ++-- tpws/tpws.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index 7a9debe..bec9b4e 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -851,7 +851,7 @@ static unsigned int hash_jen(const void *data,unsigned int len) static void exithelp(void) { printf( - " @\t\t\t\t\t; read file for options. must be the only argument. other options are ignored.\n\n" + " @|$\t\t\t; read file for options. must be the only argument. other options are ignored.\n\n" " --debug=0|1|syslog|@\n" #ifdef __linux__ " --qnum=\n" @@ -1070,7 +1070,7 @@ int main(int argc, char **argv) } #endif - if (argc>=2 && argv[1][0]=='@') + if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$')) { config_from_file(argv[1]+1); argv=params.wexp.we_wordv; diff --git a/tpws/tpws.c b/tpws/tpws.c index 6f125d2..27d04c9 100644 --- a/tpws/tpws.c +++ b/tpws/tpws.c @@ -122,7 +122,7 @@ static int get_default_ttl(void) static void exithelp(void) { printf( - " @\t\t\t\t; read file for options. must be the only argument. other options are ignored.\n\n" + " @|$\t\t; read file for options. must be the only argument. other options are ignored.\n\n" " --bind-addr=|\t; for v6 link locals append %%interface_name\n" " --bind-iface4=\t\t; bind to the first ipv4 addr of interface\n" " --bind-iface6=\t\t; bind to the first ipv6 addr of interface\n" @@ -426,7 +426,7 @@ void parse_params(int argc, char *argv[]) dp = &dpl->dp; dp->n = ++desync_profile_count; - if (argc>=2 && argv[1][0]=='@') + if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$')) { config_from_file(argv[1]+1); argv=params.wexp.we_wordv;