summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Watkins <noahwatkins@gmail.com>2013-07-20 18:41:40 -0700
committerNoah Watkins <noahwatkins@gmail.com>2013-07-20 18:41:40 -0700
commit50eb5bde26fcc977ec4ac55bf4be80c95b07e36d (patch)
tree069bab05eaf532ea94a9c04c6de292204f24438b
parenteb35b16078f6b4b86d4131333f8051db3ad09d8a (diff)
downloadceph-50eb5bde26fcc977ec4ac55bf4be80c95b07e36d.tar.gz
fuse: define IOCTL flags for non-Linux system
The Ceph client re-uses the _IOR, _IOW Linux macros for computing IOCTL flags, but these macros are not available on non-Linux systems. This patch defines IOCTL numbers in this case. The IOCTL numbers used do not have to be identical to the kernel client. They only have to be consistent for a particular client build. Ideally we can move away from reusing this Linux-specific macro in the client. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
-rw-r--r--src/client/ioctl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/ioctl.h b/src/client/ioctl.h
index c15d3340a76..f7f32502096 100644
--- a/src/client/ioctl.h
+++ b/src/client/ioctl.h
@@ -19,12 +19,22 @@ struct ceph_ioctl_layout {
__s64 unused;
};
+#if defined(_IOR) && defined(_IOW)
#define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1, \
struct ceph_ioctl_layout)
#define CEPH_IOC_SET_LAYOUT _IOW(CEPH_IOCTL_MAGIC, 2, \
struct ceph_ioctl_layout)
#define CEPH_IOC_SET_LAYOUT_POLICY _IOW(CEPH_IOCTL_MAGIC, 5, \
struct ceph_ioctl_layout)
+#else
+/*
+ * It isn't necessary for the IOCTL flags to be identical to those used with
+ * the Linux kernel client, they must just be consistent for a particular
+ * client. Ideally we can remove this Linux-specific stuff for the user-space
+ * library.
+ */
+#define CEPH_IOC_GET_LAYOUT 1
+#endif
/*
* Extract identity, address of the OSD and object storing a given