loader: Remove unused canonical name field
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
3a26e7f459
commit
09929da505
|
@ -174,7 +174,7 @@ LoaderInit(void)
|
||||||
path = uwcrtpath; /* fallback: try to get libcrt.a from the uccs */
|
path = uwcrtpath; /* fallback: try to get libcrt.a from the uccs */
|
||||||
else
|
else
|
||||||
path = xcrtpath; /* get the libcrt.a we compiled with */
|
path = xcrtpath; /* get the libcrt.a we compiled with */
|
||||||
LoaderOpen (path, "libcrt", 0, &errmaj, &errmin, &wasLoaded);
|
LoaderOpen (path, 0, &errmaj, &errmin, &wasLoaded);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ do_dlopen(loaderPtr modrec, int flags)
|
||||||
/* Public Interface to the loader. */
|
/* Public Interface to the loader. */
|
||||||
|
|
||||||
int
|
int
|
||||||
LoaderOpen(const char *module, const char *cname, int handle,
|
LoaderOpen(const char *module, int handle,
|
||||||
int *errmaj, int *errmin, int *wasLoaded, int flags)
|
int *errmaj, int *errmin, int *wasLoaded, int flags)
|
||||||
{
|
{
|
||||||
loaderPtr tmp;
|
loaderPtr tmp;
|
||||||
|
@ -259,7 +259,6 @@ LoaderOpen(const char *module, const char *cname, int handle,
|
||||||
|
|
||||||
tmp = _LoaderListPush();
|
tmp = _LoaderListPush();
|
||||||
tmp->name = strdup(module);
|
tmp->name = strdup(module);
|
||||||
tmp->cname = strdup(cname);
|
|
||||||
tmp->handle = new_handle;
|
tmp->handle = new_handle;
|
||||||
|
|
||||||
if ((tmp->private = do_dlopen(tmp, flags)) == NULL) {
|
if ((tmp->private = do_dlopen(tmp, flags)) == NULL) {
|
||||||
|
@ -337,7 +336,6 @@ LoaderUnload(int handle)
|
||||||
xf86Msg(X_INFO, "Unloading %s\n", tmp->name);
|
xf86Msg(X_INFO, "Unloading %s\n", tmp->name);
|
||||||
dlclose(tmp->private);
|
dlclose(tmp->private);
|
||||||
free(tmp->name);
|
free(tmp->name);
|
||||||
free(tmp->cname);
|
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,6 @@ typedef struct _loader {
|
||||||
int handle; /* Unique id used to remove symbols from
|
int handle; /* Unique id used to remove symbols from
|
||||||
* this module when it is unloaded */
|
* this module when it is unloaded */
|
||||||
char *name;
|
char *name;
|
||||||
char *cname;
|
|
||||||
void *private; /* format specific data */
|
void *private; /* format specific data */
|
||||||
loaderPtr next;
|
loaderPtr next;
|
||||||
} loaderRec;
|
} loaderRec;
|
||||||
|
@ -87,7 +86,7 @@ extern const ModuleVersions LoaderVersionInfo;
|
||||||
extern unsigned long LoaderOptions;
|
extern unsigned long LoaderOptions;
|
||||||
|
|
||||||
/* Internal Functions */
|
/* Internal Functions */
|
||||||
int LoaderOpen(const char *, const char *, int, int *, int *, int *, int);
|
int LoaderOpen(const char *, int, int *, int *, int *, int);
|
||||||
int LoaderHandleOpen(int);
|
int LoaderHandleOpen(int);
|
||||||
|
|
||||||
#endif /* _LOADER_H */
|
#endif /* _LOADER_H */
|
||||||
|
|
|
@ -926,8 +926,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
||||||
*errmin = 0;
|
*errmin = 0;
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
}
|
}
|
||||||
ret->handle = LoaderOpen(found, name, 0,
|
ret->handle = LoaderOpen(found, 0, errmaj, errmin, &wasLoaded, flags);
|
||||||
errmaj, errmin, &wasLoaded, flags);
|
|
||||||
if (ret->handle < 0)
|
if (ret->handle < 0)
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue