summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-06-01 20:41:21 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-06-01 20:41:21 +0000
commit97203f1cf6e5b7c6389f69cbb1b75ac675d09531 (patch)
treeadc1213155b679f489cb704bdfcf57369f6c5862 /hw
parent6d594ebc667afd404556ec3e108c810946b20ac5 (diff)
Clean up a warning, and remove excess multiple-suffix code.
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/loader/loader.c2
-rw-r--r--hw/xfree86/loader/loadmod.c40
2 files changed, 18 insertions, 24 deletions
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 006581235..dc474c477 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -272,7 +272,7 @@ static loader_funcs funcs[] = {
DLResolveSymbols,
DLCheckForUnresolved,
ARCHIVEAddressToSection,
- DLUnloadModule, {0, 0, 0, 0, 0}},
+ DLUnloadModule, {0, 0}},
};
int numloaders = sizeof(funcs) / sizeof(loader_funcs);
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 10bd2ef59..9c2f3a792 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -413,7 +413,6 @@ FindModule(const char *module, const char *dir, const char **subdirlist,
int dirlen;
const char **subdirs = NULL;
const char **s;
- const char suffix[3][3] = { "so", "a", "o" };
#ifndef __EMX__
dirpath = (char *)dir;
@@ -441,28 +440,23 @@ FindModule(const char *module, const char *dir, const char **subdirlist,
buf[dirlen++] = '/';
}
- for (i = 0; i < 3 && !name; i++) {
- snprintf(tmpBuf, PATH_MAX, "%slib%s.%s", buf, module,
- suffix[i]);
- if (stat(tmpBuf, &stat_buf) == 0) {
- name = tmpBuf;
- break;
- }
- snprintf(tmpBuf, PATH_MAX, "%s%s_drv.%s", buf, module,
- suffix[i]);
- if (stat(tmpBuf, &stat_buf) == 0) {
- name = tmpBuf;
- break;
- }
- snprintf(tmpBuf, PATH_MAX, "%s%s.%s", buf, module,
- suffix[i]);
- if (stat(tmpBuf, &stat_buf) == 0) {
- name = tmpBuf;
- break;
- }
- }
- if (name)
- break;
+ snprintf(tmpBuf, PATH_MAX, "%slib%s.so", buf, module);
+ if (stat(tmpBuf, &stat_buf) == 0) {
+ name = tmpBuf;
+ break;
+ }
+
+ snprintf(tmpBuf, PATH_MAX, "%s%s_drv.so", buf, module);
+ if (stat(tmpBuf, &stat_buf) == 0) {
+ name = tmpBuf;
+ break;
+ }
+
+ snprintf(tmpBuf, PATH_MAX, "%s%s.so", buf, module);
+ if (stat(tmpBuf, &stat_buf) == 0) {
+ name = tmpBuf;
+ break;
+ }
}
}
FreeSubdirs(subdirs);