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:
John Polstra 1997-01-14 17:53:55 +00:00
parent bf083f9e6b
commit 20995a4fcc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21693
2 changed files with 8 additions and 0 deletions

View File

@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
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;
return strdup(hstrtab + bp->hi_pathx);
}

View File

@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
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;
return strdup(hstrtab + bp->hi_pathx);
}