aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-19 20:43:37 +0000
committermarha <marha@users.sourceforge.net>2009-10-19 20:43:37 +0000
commit9dbe22229a8031aa2f6d922896e1b6539441b7b5 (patch)
treebd567f1d98f9431b4963dc3d0b05aea8ac78a1b6 /xorg-server/mi
parent07d4e6e86e3167bed18d2af81a56f3d9352d2541 (diff)
parent7687adcc34c9fc43d526f30b1cf2039b0af48841 (diff)
downloadvcxsrv-9dbe22229a8031aa2f6d922896e1b6539441b7b5.tar.gz
vcxsrv-9dbe22229a8031aa2f6d922896e1b6539441b7b5.tar.bz2
vcxsrv-9dbe22229a8031aa2f6d922896e1b6539441b7b5.zip
svn merge ^/branches/released
Diffstat (limited to 'xorg-server/mi')
-rw-r--r--xorg-server/mi/miinitext.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c
index 0dca390bb..2a67fd371 100644
--- a/xorg-server/mi/miinitext.c
+++ b/xorg-server/mi/miinitext.c
@@ -359,8 +359,14 @@ Bool EnableDisableExtension(char *name, Bool enable)
for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
if (strcmp(name, ext->name) == 0) {
- *ext->disablePtr = !enable;
- return TRUE;
+ if (ext->disablePtr != NULL) {
+ *ext->disablePtr = !enable;
+ return TRUE;
+ } else {
+ /* Extension is always on, impossible to disable */
+ return enable; /* okay if they wanted to enable,
+ fail if they tried to disable */
+ }
}
}
@@ -370,12 +376,24 @@ Bool EnableDisableExtension(char *name, Bool enable)
void EnableDisableExtensionError(char *name, Bool enable)
{
ExtensionToggle *ext = &ExtensionToggleList[0];
+ Bool found = FALSE;
- ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
+ for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) {
+ ErrorF("[mi] Extension \"%s\" can not be disabled\n", name);
+ found = TRUE;
+ break;
+ }
+ }
+ if (found == FALSE)
+ ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
enable ? "enabled" : "disabled");
- for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++)
- ErrorF("[mi] %s\n", ext->name);
+ for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ if (ext->disablePtr != NULL) {
+ ErrorF("[mi] %s\n", ext->name);
+ }
+ }
}
#ifndef XFree86LOADER