Add a -showDefaultModulePath option.
As discussed on the mailing list, people would rather have an X command-line option to print the module path so installers can know where to put modules, rather than the installers using `pkg-config --variable=moduledir xorg-server`, since some distros choose not to install xorg-server.pc.
This commit is contained in:
		
							parent
							
								
									61832cb94c
								
							
						
					
					
						commit
						0a2a6e4070
					
				| 
						 | 
					@ -100,6 +100,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void xf86PrintBanner(void);
 | 
					static void xf86PrintBanner(void);
 | 
				
			||||||
static void xf86PrintMarkers(void);
 | 
					static void xf86PrintMarkers(void);
 | 
				
			||||||
 | 
					static void xf86PrintDefaultModulePath(void);
 | 
				
			||||||
static void xf86RunVtInit(void);
 | 
					static void xf86RunVtInit(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __UNIXOS2__
 | 
					#ifdef __UNIXOS2__
 | 
				
			||||||
| 
						 | 
					@ -1376,6 +1377,11 @@ ddxProcessArgument(int argc, char **argv, int i)
 | 
				
			||||||
    xf86PrintBanner();
 | 
					    xf86PrintBanner();
 | 
				
			||||||
    exit(0);
 | 
					    exit(0);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  if (!strcmp(argv[i],"-showDefaultModulePath"))
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    xf86PrintDefaultModulePath();
 | 
				
			||||||
 | 
					    exit(0);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  /* Notice the -fp flag, but allow it to pass to the dix layer */
 | 
					  /* Notice the -fp flag, but allow it to pass to the dix layer */
 | 
				
			||||||
  if (!strcmp(argv[i], "-fp"))
 | 
					  if (!strcmp(argv[i], "-fp"))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
| 
						 | 
					@ -1625,6 +1631,7 @@ ddxUseMsg()
 | 
				
			||||||
  ErrorF("-ignoreABI             make module ABI mismatches non-fatal\n");
 | 
					  ErrorF("-ignoreABI             make module ABI mismatches non-fatal\n");
 | 
				
			||||||
  ErrorF("-isolateDevice bus_id  restrict device resets to bus_id (PCI only)\n");
 | 
					  ErrorF("-isolateDevice bus_id  restrict device resets to bus_id (PCI only)\n");
 | 
				
			||||||
  ErrorF("-version               show the server version\n");
 | 
					  ErrorF("-version               show the server version\n");
 | 
				
			||||||
 | 
					  ErrorF("-showDefaultModulePath show the server default module path\n");
 | 
				
			||||||
  /* OS-specific usage */
 | 
					  /* OS-specific usage */
 | 
				
			||||||
  xf86UseMsg();
 | 
					  xf86UseMsg();
 | 
				
			||||||
  ErrorF("\n");
 | 
					  ErrorF("\n");
 | 
				
			||||||
| 
						 | 
					@ -1747,6 +1754,12 @@ xf86PrintMarkers()
 | 
				
			||||||
  LogPrintMarkers();
 | 
					  LogPrintMarkers();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void
 | 
				
			||||||
 | 
					xf86PrintDefaultModulePath(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  ErrorF("%s\n", DEFAULT_MODULE_PATH);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
xf86RunVtInit(void)
 | 
					xf86RunVtInit(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -426,6 +426,9 @@ Print out the server version, patchlevel, release date, the operating
 | 
				
			||||||
system/platform it was built on, and whether it includes module loader
 | 
					system/platform it was built on, and whether it includes module loader
 | 
				
			||||||
support.
 | 
					support.
 | 
				
			||||||
.TP 8
 | 
					.TP 8
 | 
				
			||||||
 | 
					.B \-showDefaultModulePath
 | 
				
			||||||
 | 
					Print out the default module path the server was compiled with.
 | 
				
			||||||
 | 
					.TP 8
 | 
				
			||||||
.BI \-config " file"
 | 
					.BI \-config " file"
 | 
				
			||||||
Read the server configuration from
 | 
					Read the server configuration from
 | 
				
			||||||
.IR file .
 | 
					.IR file .
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue