libhfuzz/persistent: print number of received bytes
diff --git a/libhfuzz/persistent.c b/libhfuzz/persistent.c
index 8b67e08..18862d4 100644
--- a/libhfuzz/persistent.c
+++ b/libhfuzz/persistent.c
@@ -71,8 +71,9 @@
}
uint64_t rcvLen;
- if (files_readFromFd(_HF_PERSISTENT_FD, (uint8_t*)&rcvLen, sizeof(rcvLen)) != sizeof(rcvLen)) {
- LOG_F("readFromFd(rcvLen, size=%zu) failed", sizeof(rcvLen));
+ ssize_t sz = files_readFromFd(_HF_PERSISTENT_FD, (uint8_t*)&rcvLen, sizeof(rcvLen));
+ if (sz != sizeof(rcvLen)) {
+ LOG_F("readFromFd(rcvLen, size=%zu) failed, received=%zd bytes", sizeof(rcvLen), sz);
}
*buf_ptr = inputFile;