Fixed nlookup and bfindex for pointlist handling. Added -C config option to utils. Updated man-files
This commit is contained in:
+18
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user