mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:14:13 +08:00
mdbx: minor refine mdbx_chk
output.
Change-Id: I2c2560910d2908afe0f4a3aee0dc465ca7e24030
This commit is contained in:
parent
f5d75a85b0
commit
e6462dfe58
@ -123,7 +123,7 @@ static void __printf_args(1, 2) error(const char *msg, ...) {
|
|||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(NULL);
|
||||||
va_start(args, msg);
|
va_start(args, msg);
|
||||||
fputs(" ! ", stderr);
|
fputs(" ! ", stderr);
|
||||||
vfprintf(stderr, msg, args);
|
vfprintf(stderr, msg, args);
|
||||||
@ -1370,12 +1370,13 @@ int main(int argc, char *argv[]) {
|
|||||||
if (!dont_traversal &&
|
if (!dont_traversal &&
|
||||||
(envflags & (MDBX_EXCLUSIVE | MDBX_RDONLY)) != MDBX_RDONLY) {
|
(envflags & (MDBX_EXCLUSIVE | MDBX_RDONLY)) != MDBX_RDONLY) {
|
||||||
if (walk.pgcount != alloc_pages - gc_pages) {
|
if (walk.pgcount != alloc_pages - gc_pages) {
|
||||||
error("used pages mismatch (%" PRIu64 " != %" PRIu64 ")\n",
|
error("used pages mismatch (%" PRIu64 "(walked) != %" PRIu64
|
||||||
|
"(allocated - GC))\n",
|
||||||
walk.pgcount, alloc_pages - gc_pages);
|
walk.pgcount, alloc_pages - gc_pages);
|
||||||
}
|
}
|
||||||
if (unused_pages != gc_pages) {
|
if (unused_pages != gc_pages) {
|
||||||
error("gc pages mismatch (%" PRIu64 " != %" PRIu64 ")\n", unused_pages,
|
error("gc pages mismatch (%" PRIu64 "(walked) != %" PRIu64 "(GC))\n",
|
||||||
gc_pages);
|
unused_pages, gc_pages);
|
||||||
}
|
}
|
||||||
} else if (verbose) {
|
} else if (verbose) {
|
||||||
print(" - skip check used and gc pages (btree-traversal with "
|
print(" - skip check used and gc pages (btree-traversal with "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user