mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-23 02:04:46 +00:00
Don't be so selective about which errors cause us to continue and
which ones cause us to fail. Now all open errors on the databse file will cause the next file in the list to be tried. Submitted by: Arne Henrik Juul <arnej@math.ntnu.no> PR: 4585
This commit is contained in:
parent
bc47530cab
commit
43b4fd733d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44921
|
@ -267,13 +267,8 @@ getent(cap, len, db_array, fd, name, depth, nfield)
|
|||
return (retval);
|
||||
} else {
|
||||
fd = open(*db_p, O_RDONLY, 0);
|
||||
if (fd < 0) {
|
||||
/* No error on unfound file. */
|
||||
if (errno == ENOENT)
|
||||
continue;
|
||||
free(record);
|
||||
return (-2);
|
||||
}
|
||||
if (fd < 0)
|
||||
continue;
|
||||
myfd = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue