[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT/NEWLIB PATCH] include/fcntl.h: Replace O_NONBLOCK with new one on arm
Thanks, Justin. I tested this, all good. It can be upstreamed. Razvan Jia He <justin.he@xxxxxxx> writes: > in newlib _default_fcntl.h, it defines O_NONBLOCK as follows: > \#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */ > But it is different from linux definition(04000=0x800): > \#define O_NONBLOCK 00004000 > > This difference confused virtio-9p open() syscall. If you open a > file with O_NONBLOCK(is 0x4000 in newlib) and sys_open will regard > it as O_DIRECTORY. At last it returns a ENOTDIR error. > > Signed-off-by: Jia He <justin.he@xxxxxxx> > --- > include/fcntl.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/fcntl.h b/include/fcntl.h > index feb4f7c..367c1e6 100644 > --- a/include/fcntl.h > +++ b/include/fcntl.h > @@ -15,6 +15,8 @@ > #define O_DIRECT 040000 > #define O_NOATIME 01000000 > #elif ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32)) > +#undef O_NONBLOCK > +#define O_NONBLOCK 04000 > #define O_NOFOLLOW 0100000 > #define O_DIRECTORY 040000 > #define O_CLOEXEC 02000000
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |