diff options
author | Noah Watkins <noahwatkins@gmail.com> | 2013-07-20 18:41:40 -0700 |
---|---|---|
committer | Noah Watkins <noahwatkins@gmail.com> | 2013-09-17 10:22:53 -0700 |
commit | 94600ba6d722017f964c3455a3f4e96ab109fb46 (patch) | |
tree | 3e3daf9595b057fe5c94ef4c5d4a7b81c95ff9d4 | |
parent | 2b55b52024c1e71e2dc8b4fa67c89dc33a58f2eb (diff) | |
download | ceph-94600ba6d722017f964c3455a3f4e96ab109fb46.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.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/ioctl.h b/src/client/ioctl.h index 35b4ce4ac0f..6744547a201 100644 --- a/src/client/ioctl.h +++ b/src/client/ioctl.h @@ -20,12 +20,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 |