From: Noah Watkins Date: Fri, 19 Oct 2012 19:20:40 +0000 (-0700) Subject: java: add O_WRONLY open flag X-Git-Tag: v0.55~196^2^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1c45775a83e955fd1d154c68c8f1304b533cd78e;p=ceph.git java: add O_WRONLY open flag Signed-off-by: Noah Watkins --- diff --git a/src/java/java/com/ceph/fs/CephMount.java b/src/java/java/com/ceph/fs/CephMount.java index 0211f673073c5..f9a6e430a60c3 100644 --- a/src/java/java/com/ceph/fs/CephMount.java +++ b/src/java/java/com/ceph/fs/CephMount.java @@ -44,6 +44,7 @@ public class CephMount { public static final int O_CREAT = 8; public static final int O_TRUNC = 16; public static final int O_EXCL = 32; + public static final int O_WRONLY = 64; /* * Whence flags for seek(). diff --git a/src/java/native/libcephfs_jni.cc b/src/java/native/libcephfs_jni.cc index dd23c36d6e180..347437c9aa22b 100644 --- a/src/java/native/libcephfs_jni.cc +++ b/src/java/native/libcephfs_jni.cc @@ -53,6 +53,7 @@ #define JAVA_O_CREAT 8 #define JAVA_O_TRUNC 16 #define JAVA_O_EXCL 32 +#define JAVA_O_WRONLY 64 /* * Whence flags for seek(). sync with CephMount.java if changed. @@ -94,6 +95,7 @@ static inline int fixup_open_flags(jint jflags) FIXUP_OPEN_FLAG(O_CREAT) FIXUP_OPEN_FLAG(O_TRUNC) FIXUP_OPEN_FLAG(O_EXCL) + FIXUP_OPEN_FLAG(O_WRONLY) #undef FIXUP_OPEN_FLAG