From be36ff68854c86247fdc769c0eaa89eb284b5ca7 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 29 Apr 2004 17:13:24 +0000 Subject: add -W to specify window size. various other little fixes. --- src/lib9/create.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib9/create.c') diff --git a/src/lib9/create.c b/src/lib9/create.c index 97f6e7e2..eaea479c 100644 --- a/src/lib9/create.c +++ b/src/lib9/create.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE /* for Linux O_DIRECT */ #include #define NOPLAN9DEFINES #include @@ -25,6 +26,10 @@ p9create(char *path, int mode, ulong perm) }else{ umode = (mode&3)|O_CREAT|O_TRUNC; mode &= ~(3|OTRUNC); + if(mode&ODIRECT){ + umode |= O_DIRECT; + mode &= ~ODIRECT; + } if(mode&OEXCL){ umode |= O_EXCL; mode &= ~OEXCL; -- cgit v1.2.3