syscall.sh / riscv64 / sethostname

sethostname

get/set hostname

sys_sethostname(char *name, int len)
number161 (0xa1)
abicommon
entry pointsys_sethostname
sinceLinux 4.15
man pagesethostname(2)
sourceelixir.bootlin.com

Registers

registervalue
a7161, the syscall number
a0char *name
a1int len
a0the return value

Then run ecall to enter the kernel.

Same syscall on other architectures

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