| Date: Tue, 22 Dec 2009 08:42:27 -0800
9vx: make fscreate exclusive, as per 9P
R=rsc
http://codereview.appspot.com/180116
Diffstat:
src/9vx/devfs-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- |
| @@ -480,7 +480,7 @@ fscreate(Chan *c, char *name, int mode, ulong perm)
mm = mode & 3;
if(mode & OTRUNC)
mm |= O_TRUNC;
- if((fd = open(path, mm|O_CREAT, 0666)) < 0)
+ if((fd = open(path, mm|O_CREAT|O_EXCL, 0666)) < 0)
oserror();
// Be like Plan 9 file servers: inherit mode bits
// and group from parent. |