Remove extra / from Loading module line
In the X log, upon module load, it prints a line similar to the following. > (II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so The attached patch removes the extra / before the module name. Code already exists in hw/xfree86/loader/loadmod.c:InitPathList to add a trailing slash if needed, removing the one added by sprintf is harmless. Signed-off-by: James Cloos <cloos@jhcloos.com>
This commit is contained in:
parent
3903e23153
commit
15ac25627e
|
@ -411,21 +411,21 @@ FindModuleInSubdir(const char *dirpath, const char *module)
|
||||||
snprintf(tmpBuf, PATH_MAX, "lib%s.so", module);
|
snprintf(tmpBuf, PATH_MAX, "lib%s.so", module);
|
||||||
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
||||||
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
||||||
sprintf(ret, "%s/%s", dirpath, tmpBuf);
|
sprintf(ret, "%s%s", dirpath, tmpBuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module);
|
snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module);
|
||||||
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
||||||
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
||||||
sprintf(ret, "%s/%s", dirpath, tmpBuf);
|
sprintf(ret, "%s%s", dirpath, tmpBuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(tmpBuf, PATH_MAX, "%s.so", module);
|
snprintf(tmpBuf, PATH_MAX, "%s.so", module);
|
||||||
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
if (strcmp(direntry->d_name, tmpBuf) == 0) {
|
||||||
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2);
|
||||||
sprintf(ret, "%s/%s", dirpath, tmpBuf);
|
sprintf(ret, "%s%s", dirpath, tmpBuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user