diff --git a/include/syscall-codes.h b/include/syscall-codes.h index eb0e30139..999f32d80 100644 --- a/include/syscall-codes.h +++ b/include/syscall-codes.h @@ -20,6 +20,7 @@ #define __NR_nanosleep 35 #define __NR_getpid 39 #define __NR_exit 60 +#define __NR_unlink 87 #else /* CONFIG_X86_64 */ # error x86-32 bit mode not yet implemented diff --git a/include/syscall.h b/include/syscall.h index 7aef9613e..37cbbe462 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -166,6 +166,11 @@ static always_inline unsigned long sys_getpid(void) return syscall0(__NR_getpid); } +static always_inline long sys_unlink(char *pathname) +{ + return syscall1(__NR_unlink, (unsigned long)pathname); +} + /* * Note this call expects a signal frame on stack * (regs->sp) so be very carefull here!