libroot_build _kern_read_dir(): reset errno before readdir()

Since we're checking errno when readdir() didn't return an entry, we
need to reset it before, or we might see a spurious error value.
This commit is contained in:
Ingo Weinhold 2013-05-27 01:05:58 +02:00
parent a196160c9a
commit 75c10de291

View File

@ -609,6 +609,7 @@ _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize,
// get the next entry
dirent *entry;
errno = 0;
if (dynamic_cast<AttrDirDescriptor*>(descriptor))
entry = fs_read_attr_dir(descriptor->dir);
else