diff --git a/stand/kboot/arch/amd64/syscall_nr.h b/stand/kboot/arch/amd64/syscall_nr.h index 62deefe7353..b847b21efa8 100644 --- a/stand/kboot/arch/amd64/syscall_nr.h +++ b/stand/kboot/arch/amd64/syscall_nr.h @@ -5,6 +5,7 @@ #define SYS_gettimeofday 96 #define SYS_kexec_load 246 #define SYS_lseek 8 +#define SYS_mkdirat 258 #define SYS_mmap 9 #define SYS_munmap 11 #define SYS_newfstat 5 diff --git a/stand/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/arch/powerpc64/syscall_nr.h index d6678d9044d..b86874b92e7 100644 --- a/stand/kboot/arch/powerpc64/syscall_nr.h +++ b/stand/kboot/arch/powerpc64/syscall_nr.h @@ -6,6 +6,7 @@ #define SYS_gettimeofday 78 #define SYS_kexec_load 268 #define SYS_llseek 140 +#define SYS_mkdirat 287 #define SYS_mmap 90 #define SYS_munmap 91 #define SYS_newfstat SYS_fstat diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index 10d4166514b..76a5efb0a09 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -99,6 +99,7 @@ int host_getpid(void); int host_gettimeofday(struct host_timeval *a, void *b); int host_kexec_load(uint32_t start, int nsegs, uint32_t segs, uint32_t flags); ssize_t host_llseek(int fd, int32_t offset_high, int32_t offset_lo, uint64_t *result, int whence); +int host_mkdir(const char *, host_mode_t); void *host_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off); int host_munmap(void *addr, size_t len); int host_open(const char *path, int flags, int mode); diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/host_syscalls.c index 2fe4c599df8..99f5444eb46 100644 --- a/stand/kboot/host_syscalls.c +++ b/stand/kboot/host_syscalls.c @@ -63,6 +63,12 @@ host_llseek(int fd, int32_t offset_high, int32_t offset_lo, uint64_t *result, in #endif } +int +host_mkdir(const char *path, host_mode_t mode) +{ + return host_syscall(SYS_mkdirat, HOST_AT_FDCWD, (uintptr_t)path, mode); +} + void * host_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) {