syscall.sh / sh / readdir

readdir

read directory entry

sys_old_readdir(unsigned int fd, struct old_linux_dirent *dirent, unsigned int count)
number89 (0x59)
abicommon
entry pointsys_old_readdir
sinceLinux 5.0
man pagereaddir(2)
sourceelixir.bootlin.com

Registers

registervalue
r389, the syscall number
r4unsigned int fd
r5struct old_linux_dirent *dirent
r6unsigned int count
r0the return value

Then run trapa #31 to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/sh/readdir