diff options
author | marha <marha@users.sourceforge.net> | 2009-10-19 20:18:13 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-19 20:18:13 +0000 |
commit | f490d83dad064de52a65a1c5a7e374a1a176f05a (patch) | |
tree | 35d69842a56af15a5ec82dd875dfd5a2f987ad9c /xorg-server/mi/miinitext.c | |
parent | b567a3027bceabc0f1f42dd162268f06f15e8149 (diff) | |
download | vcxsrv-f490d83dad064de52a65a1c5a7e374a1a176f05a.tar.gz vcxsrv-f490d83dad064de52a65a1c5a7e374a1a176f05a.tar.bz2 vcxsrv-f490d83dad064de52a65a1c5a7e374a1a176f05a.zip |
Updated to xorg-server-1.7.0.902
Diffstat (limited to 'xorg-server/mi/miinitext.c')
-rw-r--r-- | xorg-server/mi/miinitext.c | 28 |
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 |