diff options
author | Pierre Ossman <ossman@cendio.se> | 2013-04-09 14:54:17 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2013-04-09 14:54:17 +0000 |
commit | 3e4e1865de17bca4eb64b6dd72e8b08819b6c611 (patch) | |
tree | 0d9ac483c8f20d9a3bfe547e37cd450f43783be7 /unix | |
parent | 87524d2c77702d247228f11f801518eb8f6e865b (diff) | |
download | tigervnc-3e4e1865de17bca4eb64b6dd72e8b08819b6c611.tar.gz tigervnc-3e4e1865de17bca4eb64b6dd72e8b08819b6c611.zip |
Copy the -verbose and -quiet parameters from Xorg so that we
can control log output from the X core.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5068 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.cc | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index a52c945f..8488d23c 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -87,8 +87,8 @@ extern "C" { #undef VENDOR_RELEASE #undef VENDOR_STRING #include "version-config.h" -#include "site.h" #endif +#include "site.h" #undef class #undef public } @@ -170,6 +170,8 @@ static char displayNumStr[16]; char *listenaddr = NULL; +static int vncVerbose = DEFAULT_LOG_VERBOSITY; + static void vfbInitializePixmapDepths(void) @@ -326,6 +328,8 @@ ddxUseMsg() ErrorF("-inetd has been launched from inetd\n"); ErrorF("-interface IP_address listen on specified interface\n"); ErrorF("-noclipboard disable clipboard settings modification via vncconfig utility\n"); + ErrorF("-verbose [n] verbose startup messages\n"); + ErrorF("-quiet minimal startup messages\n"); ErrorF("\nVNC parameters:\n"); fprintf(stderr,"\n" @@ -609,7 +613,30 @@ ddxProcessArgument(int argc, char *argv[], int i) noclipboard = true; return 1; } - + + if (!strcmp(argv[i], "-verbose")) { + if (++i < argc && argv[i]) { + char *end; + long val; + + val = strtol(argv[i], &end, 0); + if (*end == '\0') { + vncVerbose = val; + LogSetParameter(XLOG_VERBOSITY, vncVerbose); + return 2; + } + } + vncVerbose++; + LogSetParameter(XLOG_VERBOSITY, vncVerbose); + return 1; + } + + if (!strcmp(argv[i], "-quiet")) { + vncVerbose = -1; + LogSetParameter(XLOG_VERBOSITY, vncVerbose); + return 1; + } + if (rfb::Configuration::setParam(argv[i])) return 1; |