diff options
Diffstat (limited to 'xorg-server/hw/xfree86/loader/loader.c')
-rw-r--r-- | xorg-server/hw/xfree86/loader/loader.c | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index 159b61198..b72b8b89d 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -99,20 +99,20 @@ extern void *xorg_symbols[]; void LoaderInit(void) { - xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)xorg_symbols); + xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *) xorg_symbols); xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n"); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, - GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), - GET_ABI_MINOR(LoaderVersionInfo.ansicVersion)); + GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), + GET_ABI_MINOR(LoaderVersionInfo.ansicVersion)); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_VIDEODRV, - GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion), - GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion)); + GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion), + GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion)); xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_XINPUT, - GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion), - GET_ABI_MINOR(LoaderVersionInfo.xinputVersion)); + GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion), + GET_ABI_MINOR(LoaderVersionInfo.xinputVersion)); xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION, - GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), - GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); + GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), + GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); } @@ -130,12 +130,12 @@ LoaderOpen(const char *module, int *errmaj, int *errmin) xf86Msg(X_INFO, "Loading %s\n", module); if (!(ret = dlopen(module, DLOPEN_LAZY | DLOPEN_GLOBAL))) { - xf86Msg(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); - if (errmaj) - *errmaj = LDR_NOLOAD; - if (errmin) - *errmin = LDR_NOLOAD; - return NULL; + xf86Msg(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); + if (errmaj) + *errmaj = LDR_NOLOAD; + if (errmin) + *errmin = LDR_NOLOAD; + return NULL; } return ret; @@ -149,13 +149,13 @@ LoaderSymbol(const char *name) p = dlsym(RTLD_DEFAULT, name); if (p != NULL) - return p; + return p; if (!global_scope) - global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); + global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); if (global_scope) - return dlsym(global_scope, name); + return dlsym(global_scope, name); return NULL; } @@ -165,7 +165,7 @@ LoaderUnload(const char *name, void *handle) { xf86Msg(X_INFO, "Unloading %s\n", name); if (handle) - dlclose(handle); + dlclose(handle); } unsigned long LoaderOptions = 0; @@ -189,17 +189,18 @@ LoaderGetABIVersion(const char *abiclass) const char *name; int version; } classes[] = { - { ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion }, - { ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion }, - { ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion }, - { ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion }, - { ABI_CLASS_FONT, LoaderVersionInfo.fontVersion }, - { NULL, 0 } + { + ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, { + ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, { + ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, { + ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, { + ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, { + NULL, 0} }; int i; - for(i = 0; classes[i].name; i++) { - if(!strcmp(classes[i].name, abiclass)) { + for (i = 0; classes[i].name; i++) { + if (!strcmp(classes[i].name, abiclass)) { return classes[i].version; } } |