diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c index 7db04b1a0..a0e867056 100644 --- a/hw/xfree86/loader/dlloader.c +++ b/hw/xfree86/loader/dlloader.c @@ -129,7 +129,7 @@ DLFindSymbol(const char *name) } void * -DLLoadModule(loaderPtr modrec, int fd, int flags) +DLLoadModule(loaderPtr modrec, int flags) { DLModulePtr dlfile; DLModuleList *l; diff --git a/hw/xfree86/loader/dlloader.h b/hw/xfree86/loader/dlloader.h index b705a18d0..8ae610f02 100644 --- a/hw/xfree86/loader/dlloader.h +++ b/hw/xfree86/loader/dlloader.h @@ -26,7 +26,7 @@ #ifndef _DLLOADER_H #define _DLLOADER_H -extern void *DLLoadModule(loaderPtr, int, int flags); +extern void *DLLoadModule(loaderPtr, int flags); extern void DLUnloadModule(void *); extern void *DLFindSymbol(const char *name); diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 42a9d3cd3..ddd624c2a 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -313,7 +313,6 @@ LoaderOpen(const char *module, const char *cname, int handle, { loaderPtr tmp; int new_handle; - int fd; #if defined(DEBUG) ErrorF("LoaderOpen(%s)\n", module); @@ -369,16 +368,6 @@ LoaderOpen(const char *module, const char *cname, int handle, freeHandles[new_handle] = HANDLE_USED; refCount[new_handle] = 1; - if ((fd = open(module, O_RDONLY)) < 0) { - xf86Msg(X_ERROR, "Unable to open %s\n", module); - freeHandles[new_handle] = HANDLE_FREE; - if (errmaj) - *errmaj = LDR_NOMODOPEN; - if (errmin) - *errmin = errno; - return -1; - } - tmp = _LoaderListPush(); tmp->name = malloc(strlen(module) + 1); strcpy(tmp->name, module); @@ -387,7 +376,7 @@ LoaderOpen(const char *module, const char *cname, int handle, tmp->handle = new_handle; tmp->module = moduleseq++; - if ((tmp->private = DLLoadModule(tmp, fd, flags)) == NULL) { + if ((tmp->private = DLLoadModule(tmp, flags)) == NULL) { xf86Msg(X_ERROR, "Failed to load %s\n", module); _LoaderListPop(new_handle); freeHandles[new_handle] = HANDLE_FREE; @@ -398,8 +387,6 @@ LoaderOpen(const char *module, const char *cname, int handle, return -1; } - close(fd); - return new_handle; }