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:
@@ -609,6 +609,7 @@ _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize,
|
|||||||
|
|
||||||
// get the next entry
|
// get the next entry
|
||||||
dirent *entry;
|
dirent *entry;
|
||||||
|
errno = 0;
|
||||||
if (dynamic_cast<AttrDirDescriptor*>(descriptor))
|
if (dynamic_cast<AttrDirDescriptor*>(descriptor))
|
||||||
entry = fs_read_attr_dir(descriptor->dir);
|
entry = fs_read_attr_dir(descriptor->dir);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user