If a library is found in the hints file, but the library doesn't exist,
ignore the hint. This is a straightforward fix, and it should go into 2.2 after a burn-in period of a few days. Noticed by: bde
This commit is contained in:
parent
bf083f9e6b
commit
20995a4fcc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21693
@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
|
|||||||
*/
|
*/
|
||||||
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
|
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
|
||||||
bp->hi_major == major) {
|
bp->hi_major == major) {
|
||||||
|
struct stat s;
|
||||||
|
|
||||||
|
if (stat(hstrtab + bp->hi_pathx, &s) == -1)
|
||||||
|
return NULL; /* Doesn't actually exist */
|
||||||
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
|
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
|
||||||
return strdup(hstrtab + bp->hi_pathx);
|
return strdup(hstrtab + bp->hi_pathx);
|
||||||
}
|
}
|
||||||
|
@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
|
|||||||
*/
|
*/
|
||||||
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
|
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
|
||||||
bp->hi_major == major) {
|
bp->hi_major == major) {
|
||||||
|
struct stat s;
|
||||||
|
|
||||||
|
if (stat(hstrtab + bp->hi_pathx, &s) == -1)
|
||||||
|
return NULL; /* Doesn't actually exist */
|
||||||
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
|
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
|
||||||
return strdup(hstrtab + bp->hi_pathx);
|
return strdup(hstrtab + bp->hi_pathx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user