sectionsd: unify and optimize debug messages

Origin commit data
------------------
Commit: f5346d9f91
Author: limes007 <39467727+limes007@users.noreply.github.com>
Date: 2019-02-23 (Sat, 23 Feb 2019)
This commit is contained in:
limes007
2019-02-23 22:40:56 +01:00
committed by vanhofen
parent 68acd069da
commit c8aa325509
9 changed files with 270 additions and 245 deletions

View File

@@ -2216,7 +2216,7 @@ void CNeutrinoApp::SetChannelMode(int newmode)
* CNeutrinoApp - run, the main runloop *
**************************************************************************************/
extern int cnxt_debug;
extern bool sections_debug;
extern int sections_debug;
extern int zapit_debug;
void CNeutrinoApp::CmdParser(int argc, char **argv)
@@ -2226,7 +2226,7 @@ void CNeutrinoApp::CmdParser(int argc, char **argv)
global_argv[i] = argv[i];
global_argv[argc] = NULL;
sections_debug = false;
sections_debug = 1;
softupdate = false;
//fromflash = false;
@@ -2250,7 +2250,21 @@ void CNeutrinoApp::CmdParser(int argc, char **argv)
cnxt_debug = 1;
}
else if ((!strcmp(argv[x], "-sd"))) {
sections_debug = true;
int dl = 2;
if (x+1 < argc) {
if (!strcmp(argv[x+1], "0")) {
dl = 0;
x++;
} else {
int tmp = atoi(argv[x+1]);
if (tmp) {
dl = tmp;
x++;
}
}
}
dprintf(DEBUG_NORMAL, "set sections debuglevel: %d\n", dl);
sections_debug = dl;
}
else if ((!strcmp(argv[x], "-zd"))) {
zapit_debug = 1;