Do not complain on empty first block

This commit is contained in:
Vitaliy Filippov
2024-01-02 13:24:15 +03:00
parent 16e09745f0
commit facff20ca1
+1
View File
@@ -233,6 +233,7 @@ int kv_block_t::parse(uint64_t offset, uint8_t *data, int size)
if (blk->magic == 0 || blk->type == KV_EMPTY) if (blk->magic == 0 || blk->type == KV_EMPTY)
{ {
// empty block // empty block
if (offset != 0)
fprintf(stderr, "K/V: Block %lu is %s\n", offset, blk->magic == 0 ? "empty" : "cleared"); fprintf(stderr, "K/V: Block %lu is %s\n", offset, blk->magic == 0 ? "empty" : "cleared");
return -ENOTBLK; return -ENOTBLK;
} }