diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-04-27 13:01:39 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-04-27 13:01:39 +0200 |
commit | 20065ded10e25427240171b6d0269aa317b9c7d5 (patch) | |
tree | 2e959c69bdf5ff1c77b4465e2f8cf8bfc2e3845d /unix | |
parent | 135906e4b2c3f14f52eff8b89e8e203c11a63966 (diff) | |
download | tigervnc-20065ded10e25427240171b6d0269aa317b9c7d5.tar.gz tigervnc-20065ded10e25427240171b6d0269aa317b9c7d5.zip |
Add -version argument to Xvnc
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index 6aad434b..af04c171 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -155,6 +155,14 @@ static int vncVerbose = DEFAULT_LOG_VERBOSITY; static void +vncPrintBanner(void) +{ + ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); + ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, + VENDOR_STRING); +} + +static void vfbInitializePixmapDepths(void) { int i; @@ -285,9 +293,8 @@ void ddxBeforeReset(void) void ddxUseMsg(void) { - ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); - ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, - VENDOR_STRING); + vncPrintBanner(); + ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); #ifdef RENDER @@ -309,6 +316,7 @@ void ddxUseMsg(void) ErrorF("-noclipboard disable clipboard settings modification via vncconfig utility\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-quiet minimal startup messages\n"); + ErrorF("-version show the server version\n"); ErrorF("\nVNC parameters:\n"); fprintf(stderr,"\n" @@ -611,6 +619,11 @@ ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-showconfig") || !strcmp(argv[i], "-version")) { + vncPrintBanner(); + exit(0); + } + if (vncSetParamSimple(argv[i])) return 1; @@ -1587,9 +1600,7 @@ InitOutput(ScreenInfo *scrInfo, int argc, char **argv) int i; int NumFormats = 0; - ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); - ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, - VENDOR_STRING); + vncPrintBanner(); #if XORG >= 113 #ifdef GLXEXT |