From c5ccd40caa22a251c98ad900a9f0e67b1feecc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 17 Sep 2003 01:06:43 +0000 Subject: [PATCH] It's now silent or more verbose depending on how TRACE_BFS is defined. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4720 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/file_systems/bfs/bfs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/kernel/boot/loader/file_systems/bfs/bfs.cpp b/src/kernel/boot/loader/file_systems/bfs/bfs.cpp index a41517b8d7..580755f670 100644 --- a/src/kernel/boot/loader/file_systems/bfs/bfs.cpp +++ b/src/kernel/boot/loader/file_systems/bfs/bfs.cpp @@ -18,6 +18,14 @@ #include +#define TRACE_BFS 0 +#if TRACE_BFS +# define TRACE(x) printf x +#else +# define TRACE(x) ; +#endif + + using namespace BFS; @@ -45,13 +53,14 @@ Volume::Volume(boot::Partition *partition) #endif } - printf("we do have a valid BFS super block (name = %s)!\n", fSuperBlock.name); + TRACE(("bfs: we do have a valid super block (name = %s)!\n", fSuperBlock.name)); fRootNode = new BFS::Directory(*this, Root()); if (fRootNode == NULL) return; if (fRootNode->InitCheck() < B_OK) { + TRACE(("bfs: init check for root node failed\n")); delete fRootNode; fRootNode = NULL; return; @@ -102,7 +111,7 @@ Volume::ValidateBlockRun(block_run run) || run.Start() > (1UL << AllocationGroupShift()) || run.length == 0 || uint32(run.Length() + run.Start()) > (1UL << AllocationGroupShift())) { - panic("bfs: invalid run(%ld,%d,%d)\n", run.AllocationGroup(), run.Start(), run.Length()); + dprintf("bfs: invalid run(%ld,%d,%d)\n", run.AllocationGroup(), run.Start(), run.Length()); return B_BAD_DATA; } return B_OK;