xwayland: Add -verbose option as in xfree86
Makes it easier to debug Xwayland problems. Signed-off-by: Misha Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
		
							parent
							
								
									0148a15da1
								
							
						
					
					
						commit
						4341f1da72
					
				| 
						 | 
				
			
			@ -75,6 +75,15 @@ to be an X window manager as well.
 | 
			
		|||
Force the shared memory backend instead of glamor (if available) for passing
 | 
			
		||||
buffers to the Wayland server.
 | 
			
		||||
.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
 | 
			
		||||
.BI \-version
 | 
			
		||||
Show the server version and exit.
 | 
			
		||||
.TP 8
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,6 +93,7 @@ ddxUseMsg(void)
 | 
			
		|||
    ErrorF("-eglstream             use eglstream backend for nvidia GPUs\n");
 | 
			
		||||
#endif
 | 
			
		||||
    ErrorF("-shm                   use shared memory for passing buffers\n");
 | 
			
		||||
    ErrorF("-verbose [n]           verbose startup messages\n");
 | 
			
		||||
    ErrorF("-version               show the server version and exit\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -100,6 +101,7 @@ 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)
 | 
			
		||||
| 
						 | 
				
			
			@ -161,6 +163,21 @@ ddxProcessArgument(int argc, char *argv[], int i)
 | 
			
		|||
    else if (strcmp(argv[i], "-shm") == 0) {
 | 
			
		||||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
    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], "-eglstream") == 0) {
 | 
			
		||||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,3 +6,4 @@ have_glamor=@have_glamor@
 | 
			
		|||
have_eglstream=@have_eglstream@
 | 
			
		||||
have_initfd=true
 | 
			
		||||
have_listenfd=true
 | 
			
		||||
have_verbose=true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue