]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
core: include/types.h, introduce host_to_ceph_errno 15496/head
authorWillem Jan Withagen <wjw@digiware.nl>
Mon, 5 Jun 2017 19:05:28 +0000 (21:05 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Mon, 5 Jun 2017 19:05:28 +0000 (21:05 +0200)
 - As preparation for interconnecting ceph_daemons on
   different platfoms

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/include/types.h

index f859828e8c0e49203b328cdc59a2a9e8a5542b87..ee097718d94491d72e08a3275fcdc601a2f31510 100644 (file)
@@ -476,8 +476,10 @@ ostream &operator<<(ostream &lhs, const shard_id_t &rhs);
 
 #if defined(__sun) || defined(_AIX) || defined(DARWIN)
 __s32  ceph_to_host_errno(__s32 e);
+__s32  host_to_ceph_errno(__s32 e);
 #else
 #define  ceph_to_host_errno(e) (e)
+#define  host_to_ceph_errno(e) (e)
 #endif
 
 struct errorcode32_t {
@@ -493,7 +495,8 @@ struct errorcode32_t {
   }
 
   void encode(bufferlist &bl) const {
-    ::encode(code, bl);
+    __s32 newcode = host_to_ceph_errno(code);
+    ::encode(newcode, bl);
   }
   void decode(bufferlist::iterator &bl) {
     ::decode(code, bl);