Fixed nlookup and bfindex for pointlist handling. Added -C config option to utils. Updated man-files
Altlinux build / build-alt (push) Successful in 2m46s
Archlinux build / build-arch (push) Successful in 3m19s
Archlinux build / make-test (push) Successful in 1m0s
Debian build / build-ubuntu (push) Successful in 4m7s

This commit is contained in:
zx
2025-04-20 21:56:44 +03:00
parent ff329a7602
commit 3a9ee4727a
13 changed files with 174 additions and 23 deletions
+18 -3
View File
@@ -44,7 +44,7 @@ bool eventexpr(s_expr *expr)
static void usage(void)
{
printf_usage("outbound viewer",
"usage: bfstat [-afhprst] [-n<number>]\n"
"usage: bfstat [-C config] [-afhprst] [-n<number>]\n"
"\n"
"options:\n"
" -a sort by FTN address (default)\n"
@@ -56,6 +56,7 @@ static void usage(void)
" -r reverse order while sorting\n"
" -s sort by total files size\n"
" -t disable total sizes printing\n"
" -C config use config file\n"
"\n"
);
}
@@ -248,8 +249,10 @@ int main(int argc, char *argv[])
s_opts opts;
s_sysqueue queue;
s_outbound_callback_data ocb;
char *confname = NULL;
char c;
int i;
int rc = 0;
bfstat_opts_default(&opts);
@@ -288,6 +291,10 @@ int main(int argc, char *argv[])
if( ISDEC(optarg) )
opts.nodeslimit = atoi(optarg);
break;
case 'C':
if( confname || !optarg ) { usage(); exit(BFERR_FATALERROR); }
confname = (char *)xstrcpy(optarg);
break;
default:
usage();
exit(1);
@@ -301,8 +308,16 @@ int main(int argc, char *argv[])
/* Initialise current locale */
(void)setlocale(LC_ALL, "");
if( conf_readconf(conf_getconfname(), 0, false) )
exit(1);
if( confname && *confname )
rc = conf_readconf(confname, 0, false);
else
rc = conf_readconf(conf_getconfname(), 0, false);
if( rc )
{
log("Can not find config");
exit(BFERR_FATALERROR);
}
memset(&ocb, '\0', sizeof(s_outbound_callback_data));
ocb.callback = out_handle_sysqueue;