|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 1/5] plat/linuxu: Add fstat and open host system calls
On 18.03.20 00:08, Simon Kuenzer wrote: On 28.01.20 05:01, Robert Hrusecky wrote:Add system call number for arm_32 and x86_64 for the fstat system call Implement system call wrapper function for open and fstat Add MAP_PRIVATE constant for use with mmap Signed-off-by: Robert Hrusecky <roberth@xxxxxxxxxxxxx> Signed-off-by: Omar Jamil <omarj2898@xxxxxxxxx> Signed-off-by: Sachin Beldona <sachinbeldona@xxxxxxxxxx> --- plat/linuxu/include/linuxu/syscall-arm_32.h | 1 + plat/linuxu/include/linuxu/syscall-x86_64.h | 1 + plat/linuxu/include/linuxu/syscall.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+)diff --git a/plat/linuxu/include/linuxu/syscall-arm_32.h b/plat/linuxu/include/linuxu/syscall-arm_32.hindex ef9323b..5d1b1e2 100644 --- a/plat/linuxu/include/linuxu/syscall-arm_32.h +++ b/plat/linuxu/include/linuxu/syscall-arm_32.h @@ -46,6 +46,7 @@ #define __SC_MUNMAP 91 #define __SC_EXIT 1 #define __SC_IOCTL 54 +#define __SC_FSTAT 108 #define __SC_RT_SIGPROCMASK 126 #define __SC_ARCH_PRCTL 172 #define __SC_RT_SIGACTION 174diff --git a/plat/linuxu/include/linuxu/syscall-x86_64.h b/plat/linuxu/include/linuxu/syscall-x86_64.hindex 553f0ba..0dd280e 100644 --- a/plat/linuxu/include/linuxu/syscall-x86_64.h +++ b/plat/linuxu/include/linuxu/syscall-x86_64.h @@ -42,6 +42,7 @@ #define __SC_WRITE 1 #define __SC_OPEN 2 #define __SC_CLOSE 3 +#define __SC_FSTAT 5 #define __SC_MMAP 9 #define __SC_MUNMAP 11 #define __SC_RT_SIGACTION 13diff --git a/plat/linuxu/include/linuxu/syscall.h b/plat/linuxu/include/linuxu/syscall.hindex 0dca7c5..c703b32 100644 --- a/plat/linuxu/include/linuxu/syscall.h +++ b/plat/linuxu/include/linuxu/syscall.h @@ -48,6 +48,13 @@ #error "Unsupported architecture" #endif + I forgot to mention that mode_t should be k_mode_t because of the same API-definition and libc mismatch potential. You should probably create another header: linuxu/mode.h and define the macro K_O_RDONLY also there.
Move k_mode_t to linuxu/mode.h and include that header in this file, too. typedef unsigned k_uid_t; typedef unsigned k_gid_t; typedef __u32 k_nlink_t; typedef __u32 k_nlink_t; typedef long k_blksize_t; typedef __s64 k_blkcnt_t; typedef __off k_off_t;k_timespec_t is already defined in linuxu/time.h and should be covered with the extra include.You would get the following struct declaration if you copy it from nolibc. But please double-check that this one is inline with Linux's UAPI. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |