syscall.sh / arc / sethostname

sethostname

get/set hostname

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

Registers

registervalue
r8161, the syscall number
r0char *name
r1int len
r0the return value

Then run trap0 to enter the kernel.

Same syscall on other architectures

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