diff --git a/stand/kboot/arch/amd64/syscall_nr.h b/stand/kboot/arch/amd64/syscall_nr.h index 756b3e93af9..62deefe7353 100644 --- a/stand/kboot/arch/amd64/syscall_nr.h +++ b/stand/kboot/arch/amd64/syscall_nr.h @@ -1,4 +1,5 @@ #define SYS_close 3 +#define SYS_dup 32 #define SYS_getdents 78 #define SYS_getpid 39 #define SYS_gettimeofday 96 diff --git a/stand/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/arch/powerpc64/syscall_nr.h index 13f26d80f6a..d6678d9044d 100644 --- a/stand/kboot/arch/powerpc64/syscall_nr.h +++ b/stand/kboot/arch/powerpc64/syscall_nr.h @@ -1,4 +1,5 @@ #define SYS_close 6 +#define SYS_dup 41 #define SYS_fstat 108 #define SYS_getdents 141 #define SYS_getpid 20 diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index 3b02f2e7830..10d4166514b 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -92,6 +92,7 @@ struct host_timeval { * System Calls */ int host_close(int fd); +int host_dup(int fd); int host_fstat(int fd, struct host_kstat *sb); int host_getdents(int fd, void *dirp, int count); int host_getpid(void); diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/host_syscalls.c index a69937a5a0e..2fe4c599df8 100644 --- a/stand/kboot/host_syscalls.c +++ b/stand/kboot/host_syscalls.c @@ -13,6 +13,12 @@ host_close(int fd) return host_syscall(SYS_close, fd); } +int +host_dup(int fd) +{ + return host_syscall(SYS_dup, fd); +} + int host_fstat(int fd, struct host_kstat *sb) {