summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2006-11-17 18:27:23 -0800
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-11-30 20:17:32 +0200
commit32e122466e9d5bbaddec9ad1a0dda00aa03c132b (patch)
treea9f181a22c2bf63bf39cabc52df0aaae5bec36b6 /hw
parent782166ac22ee854a4ccd9d00499085b92fb09a23 (diff)
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. (cherry picked from 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d commit)
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86Init.c13
-rw-r--r--hw/xfree86/doc/man/Xorg.man.pre3
2 files changed, 16 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 8f0a26dd7..260884faf 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -100,6 +100,7 @@
static void xf86PrintBanner(void);
static void xf86PrintMarkers(void);
+static void xf86PrintDefaultModulePath(void);
static void xf86RunVtInit(void);
#ifdef __UNIXOS2__
@@ -1488,6 +1489,11 @@ ddxProcessArgument(int argc, char **argv, int i)
xf86PrintBanner();
exit(0);
}
+ if (!strcmp(argv[i],"-showDefaultModulePath"))
+ {
+ xf86PrintDefaultModulePath();
+ exit(0);
+ }
/* Notice the -fp flag, but allow it to pass to the dix layer */
if (!strcmp(argv[i], "-fp"))
{
@@ -1737,6 +1743,7 @@ ddxUseMsg()
ErrorF("-ignoreABI make module ABI mismatches non-fatal\n");
ErrorF("-isolateDevice bus_id restrict device resets to bus_id (PCI only)\n");
ErrorF("-version show the server version\n");
+ ErrorF("-showDefaultModulePath show the server default module path\n");
/* OS-specific usage */
xf86UseMsg();
ErrorF("\n");
@@ -1860,6 +1867,12 @@ xf86PrintMarkers()
}
static void
+xf86PrintDefaultModulePath(void)
+{
+ ErrorF("%s\n", DEFAULT_MODULE_PATH);
+}
+
+static void
xf86RunVtInit(void)
{
int i;
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index b7fa990bb..580310018 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -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
support.
.TP 8
+.B \-showDefaultModulePath
+Print out the default module path the server was compiled with.
+.TP 8
.BI \-config " file"
Read the server configuration from
.IR file .