syscall.sh / sh / readdir
readdir
read directory entry
sys_old_readdir(unsigned int fd, struct old_linux_dirent *dirent, unsigned int count)
| number | 89 (0x59) |
|---|---|
| abi | common |
| entry point | sys_old_readdir |
| since | Linux 5.0 |
| man page | readdir(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
r3 | 89, the syscall number |
r4 | unsigned int fd |
r5 | struct old_linux_dirent *dirent |
r6 | unsigned int count |
r0 | the 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