diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 09cd28cb3..f3bc34d2f 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -282,12 +282,14 @@ ddxProcessArgument(int argc, char **argv, int i) ephyrFuncs.finiAccel = ephyrDrawFini; return 1; } + /* Xephyr adopted a different spelling before the common -verbose option + * was added, so it's been left for compatibility */ else if (!strcmp(argv[i], "-verbosity")) { if (i + 1 < argc && argv[i + 1][0] != '-') { int verbosity = atoi(argv[i + 1]); LogSetParameter(XLOG_VERBOSITY, verbosity); - EPHYR_LOG("set verbosiry to %d\n", verbosity); + EPHYR_LOG("set verbosity to %d\n", verbosity); return 2; } else { diff --git a/hw/xwayland/man/Xwayland.man b/hw/xwayland/man/Xwayland.man index ea6d78eed..568477de9 100644 --- a/hw/xwayland/man/Xwayland.man +++ b/hw/xwayland/man/Xwayland.man @@ -154,15 +154,6 @@ buffers to the Wayland server. This option is not compatible with \fI-glamor\fP option. .TP 8 -.BR \-verbose " [\fIn\fP]" -Sets the verbosity level for information printed on stderr. If the -.I n -value isn't supplied, each occurrence of this option increments the -verbosity level. When the -.I n -value is supplied, the verbosity level is set to that value. The default -verbosity level is 0. -.TP 8 .B \-version Show the server version and exit. .TP 8 diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index c7b66129a..91c94681b 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -110,7 +110,6 @@ ddxUseMsg(void) #ifdef XWL_HAS_GLAMOR ErrorF("-glamor [gl|es|off] use given API for Glamor acceleration. Incompatible with -shm option\n"); #endif - ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-version show the server version and exit\n"); ErrorF("-noTouchPointerEmulation disable touch pointer emulation\n"); ErrorF("-force-xrandr-emulation force non-native modes to be exposed when viewporter is not exposed by the compositor\n"); @@ -126,7 +125,6 @@ static int init_fd = -1; static int wm_fd = -1; static int listen_fds[5] = { -1, -1, -1, -1, -1 }; static int listen_fd_count = 0; -static int verbosity = 0; static void xwl_show_version(void) @@ -222,21 +220,6 @@ ddxProcessArgument(int argc, char *argv[], int i) return 2; } #endif - else if (strcmp(argv[i], "-verbose") == 0) { - if (++i < argc && argv[i]) { - char *end; - long val; - - val = strtol(argv[i], &end, 0); - if (*end == '\0') { - verbosity = val; - LogSetParameter(XLOG_VERBOSITY, verbosity); - return 2; - } - } - LogSetParameter(XLOG_VERBOSITY, ++verbosity); - return 1; - } else if (strcmp(argv[i], "-version") == 0) { xwl_show_version(); exit(0); diff --git a/man/Xserver.man b/man/Xserver.man index e21cc4a25..81f385463 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -309,6 +309,15 @@ sets video-off screen-saver preference. .B \-v sets video-on screen-saver preference. .TP 8 +.BR \-verbose " [\fIn\fP]" +Sets the verbosity level for information printed on stderr. If the +.I n +value isn't supplied, each occurrence of this option increments the +verbosity level. When the +.I n +value is supplied, the verbosity level is set to that value. The default +verbosity level is 0. +.TP 8 .B \-wr sets the default root window to solid white instead of the standard root weave pattern. diff --git a/os/utils.c b/os/utils.c index 430c84aa9..090af37c0 100644 --- a/os/utils.c +++ b/os/utils.c @@ -572,6 +572,7 @@ UseMsg(void) ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); + ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-wr create root window with white background\n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX @@ -662,6 +663,7 @@ void ProcessCommandLine(int argc, char *argv[]) { int i, skip; + int verbosity = 0; defaultKeyboardControl.autoRepeat = TRUE; @@ -948,6 +950,21 @@ ProcessCommandLine(int argc, char *argv[]) defaultScreenSaverBlanking = PreferBlanking; else if (strcmp(argv[i], "-v") == 0) defaultScreenSaverBlanking = DontPreferBlanking; + else if (strcmp(argv[i], "-verbose") == 0) { + int n = i + 1; /* next argument */ + verbosity++; + if (n < argc && argv[n] && argv[n][0] != '-') { + char *end; + long val; + + val = strtol(argv[n], &end, 0); + if (*end == '\0') { + verbosity = val; + i = n; + } + } + LogSetParameter(XLOG_VERBOSITY, verbosity); + } else if (strcmp(argv[i], "-wr") == 0) whiteRoot = TRUE; else if (strcmp(argv[i], "-background") == 0) {