[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH] Update fcntl() related definitions


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Wed, 4 Sep 2019 17:59:36 +0300
  • Cc: vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Wed, 04 Sep 2019 14:59:44 +0000
  • Ironport-phdr: 9a23:vCjSYhC2vHdUrfLnrTjEUyQJP3N1i/DPJgcQr6AfoPdwSPT4ocbcNUDSrc9gkEXOFd2Cra4d0ayP7P2rBj1IyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfK1+IA+roQjTtsQajolvJ6IswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9VoAyvqQFxzYDXZ4+YL+Zycr/HcN8GX2dNQtpdWipcCY28dYsPCO8BMP5Goon6vFsOsRq+BQ+xD+3p1z9InmL21rA93us9FgHGxxAgH9MIsHjOqNX1Kb8SUf2uwabU1jXPdetW2Srm54TSaBAhpuiBULRtesTS0UkiDx7Jg1qNpYD/PD6Y1v4Bv3aF4+diT+6ihXYrpxx+rzSy3MshiYnEipgLxl3K+yh12ps5KNKmREN9fNWqCoFftzuAOItzWs4iRmZotzskxbAeop67eTQKyIwgxx7Cd/yLa4iI7QznVOaWOTp4mndld6i+hxa260Sv1vb8WtOs0FZXtSVJiMPMtncV2xzS7MiIVOd981+81TuAygzf8OJJLEAumabFNZIswKQ8m5QLvUTGBCD2mUH2jKGMdkUj/+il8/joYrL9pp+ANo90jBvyMqAzmsynHOQ1KRQBX3OB9eSkyb3s5lf1QK9NjvEuiKnWrIjaJdgHpq6+GwJV14cj6xC+Dzehy9QUhGQII0xbeB2Zi4jkIFXOIPHjDfejmFSgijhqyO7APrH7BZXNNHfDmq/7fblh805c1BYzzddH6pJKDrEOOu/8VVfru9zeExA5KRK7w+f9BNpmzIwRRGWPAq6EMK7Jql+I+v8vLPSWaIAPpDn9MOIp5+P2jXAig1MdZ66pjtMrbyW9H/JnJF7cbXfyj9MpFWYRohF4XOHszlqYXm19fXG3Cok7/S06DsqCEJ/eDtSmh6ed3SH9GoBOe0hNERaUDH2ubYLSCKREUz6bPsI0ym9MbrOmUYJ0jRw=
  • Ironport-sdr: eaq0TVlUAFt7tkuoDhJWkdQ6LGrG+uFGpbfGb/nmNG+dKbhHgF0a158/oZbzbiOhzKq6m28cPi QW18SzC5GWhg==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Since we are using the fcntl() implementation in vfscore, we don't use newlib's
any more. This patch also adds some flags that are needed by fcntl() and that
were copied from musl, just like the previous ones from fcntl.h.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 Makefile.uk     |  2 +-
 include/fcntl.h | 13 ++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Makefile.uk b/Makefile.uk
index c02c2f0..01da724 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -792,7 +792,7 @@ LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/string/wcsdup.c
 
################################################################################
 # Newlib/libc code -- syscalls
 
################################################################################
-LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/syscalls/sysfcntl.c
+#LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/syscalls/sysfcntl.c
 
 
################################################################################
 # Newlib/libc code -- time
diff --git a/include/fcntl.h b/include/fcntl.h
index 25a4808..7a35052 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -11,15 +11,22 @@
 #define O_DIRECTORY 0200000
 #define O_CLOEXEC  02000000
 #define O_DSYNC      010000
-#endif
-
-#if ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32))
+#define O_ASYNC      020000
+#define O_DIRECT     040000
+#define O_NOATIME  01000000
+#elif ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32))
 #define O_NOFOLLOW  0100000
 #define O_DIRECTORY  040000
 #define O_CLOEXEC  02000000
 #define O_DSYNC      010000
+#define O_ASYNC      020000
+#define O_DIRECT    0200000
+#define O_NOATIME  01000000
 #endif
 
+#define FIONBIO      0x5421
+#define FIOASYNC     0x5452
+
 
 /* Glibc does not provide KEEP_SIZE and PUNCH_HOLE anymore. Instead it
  * includes linux/falloc.h.
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.