X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Finclude%2Fencoding.h;h=4dd5be629bf5c24c6f13c1c0a771cc9bc0fde924;hb=91327a770de101c8d859649fa82e887fff521e13;hp=5dd62adce297afd56ebba768afcc650a907f54a9;hpb=b32d239b4982c57cf7d9816de026050a5af8d14f;p=ceph.git diff --git a/ceph/src/include/encoding.h b/ceph/src/include/encoding.h index 5dd62adce..4dd5be629 100644 --- a/ceph/src/include/encoding.h +++ b/ceph/src/include/encoding.h @@ -139,7 +139,7 @@ WRITE_INTTYPE_ENCODER(int16_t, le16) break; \ char fn[PATH_MAX]; \ snprintf(fn, sizeof(fn), ENCODE_STRINGIFY(ENCODE_DUMP_PATH) "/%s__%d.%x", #cl, getpid(), i++); \ - int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT, 0644); \ + int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC, 0644); \ if (fd >= 0) { \ bufferlist sub; \ sub.substr_of(bl, pre_off, bl.length() - pre_off); \ @@ -1058,7 +1058,7 @@ decode(std::array& v, bufferlist::iterator& p) #define ENCODE_FINISH(bl) ENCODE_FINISH_NEW_COMPAT(bl, 0) #define DECODE_ERR_OLDVERSION(func, v, compatv) \ - (std::string(func) + " no longer understand old encoding version " #v " < " #compatv) + (std::string(func) + " no longer understand old encoding version " #v " < " + std::to_string(compatv)) #define DECODE_ERR_PAST(func) \ (std::string(func) + " decode past end of struct encoding")