Commit 2798681d authored by Ignacio Casal Quinteiro's avatar Ignacio Casal Quinteiro
Browse files

vfb: allow to set the verbosity with a parameter

parent 427f8bc0
Pipeline #72092 passed with stages
in 8 minutes and 7 seconds
......@@ -124,6 +124,7 @@ typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB, MMAPPED_FILE_FB } fbMemType;
static fbMemType fbmemtype = NORMAL_MEMORY_FB;
static char needswap = 0;
static Bool Render = TRUE;
static int verbose = 0;
#define swapcopy16(_dst, _src) \
if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \
......@@ -239,6 +240,7 @@ ddxInputThreadInit(void)
void
ddxUseMsg(void)
{
ErrorF("-verbose [n] verbose startup messages\n");
ErrorF("-screen scrn WxHxD set screen's width, height, depth\n");
ErrorF("-pixdepths list-of-int support given pixmap depths\n");
ErrorF("+/-render turn on/off RENDER extension support"
......@@ -257,6 +259,16 @@ ddxUseMsg(void)
#endif
}
static int
vfbSetVerbosity(int verb)
{
int save = verbose;
verbose = verb;
LogSetParameter(XLOG_VERBOSITY, verb);
return save;
}
int
ddxProcessArgument(int argc, char *argv[], int i)
{
......@@ -269,6 +281,21 @@ ddxProcessArgument(int argc, char *argv[], int i)
firstTime = FALSE;
}
if (!strcmp(argv[i], "-verbose")) {
if (++i < argc && argv[i]) {
char *end;
long val;
val = strtol(argv[i], &end, 0);
if (*end == '\0') {
vfbSetVerbosity(val);
return 2;
}
}
vfbSetVerbosity(++verbose);
return 1;
}
if (lastScreen == -1)
currentScreen = &defaultScreenInfo;
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment