* fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more files.
* fhandler_process.cc (fhandler_process::readdir): Ditto. * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
This commit is contained in:
@ -149,7 +149,10 @@ struct dirent *
|
||||
fhandler_process::readdir (DIR * dir)
|
||||
{
|
||||
if (dir->__d_position >= PROCESS_LINK_COUNT)
|
||||
return NULL;
|
||||
{
|
||||
set_errno (ENMFILE);
|
||||
return NULL;
|
||||
}
|
||||
strcpy (dir->__d_dirent->d_name, process_listing[dir->__d_position++]);
|
||||
syscall_printf ("%p = readdir (%p) (%s)", &dir->__d_dirent, dir,
|
||||
dir->__d_dirent->d_name);
|
||||
|
Reference in New Issue
Block a user