}
namespace FB {
+const unsigned int FB_ID_OFFSET = 4;
+const unsigned int FB_ID_SIZE = 4;
+
std::ostream &operator<<(std::ostream &stream, const FB::File &file);
}
return err("mmap");
auto mmapGuard = transaction_guard::makeGuard([&] () { releaseMMap(); });
-
if (verify) {
auto verifier = flatbuffers::Verifier(mem, length);
if (!FB::VerifyFileBuffer(verifier) || !FB::FileBufferHasIdentifier(mem)) {
- tslog::log_error("verification of serialized data: failed\n");
- return false;
+ char fid[FB::FB_ID_SIZE + 1] = {0, };
+ strncpy(fid, (const char *)(mem + FB::FB_ID_OFFSET), FB::FB_ID_SIZE);
+
+ if (strcmp(fid, "LDP1") == 0) {
+ tslog::log_error("verification of serialized data: not available\n");
+ tslog::log_error("header ID : ", FB::FileIdentifier(), "\n");
+ tslog::log_error("serialized data ID : ", fid, "\n");
+ } else {
+ tslog::log_error("verification of serialized data: failed\n");
+ return false;
+ }
}
}