syscall.sh / arm64 / truncate
truncate
truncate a file to a specified length
sys_truncate(const char *path, long length)
| number | 45 (0x2d) |
|---|---|
| abi | 64 |
| entry point | sys_truncate |
| since | Linux 3.7 |
| man page | truncate(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
x8 | 45, the syscall number |
x0 | const char *path |
x1 | long length |
x0 | the return value |
Then run svc #0 to enter the kernel.
Same syscall on other architectures
- x64 76
- x86 92
- arm 92
- riscv64 45
- x32 1073741900
- loongarch64 45
- ppc64 92
- ppc 92
- s390x 92
- mips64 5074
- mipsn32 6074
- mipso32 4092
- alpha 129
- m68k 92
- microblaze 92
- parisc 92
- sh 92
- sparc 129
- sparc64 129
- xtensa 22
Get this as JSON: https://api.syscall.sh/v2/syscalls/arm64/truncate