* Build fix when built with DEBUG defined.

* Forgot to remove the "bfs_block_runs" debugger command on module unload.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26800 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-08-04 17:56:13 +00:00
parent 8976dbe878
commit 1be4b7c0c5
3 changed files with 8 additions and 7 deletions
@@ -456,8 +456,8 @@ BPlusTree::SetTo(Inode* stream)
// is header valid? // is header valid?
if (fHeader->MaximumSize() != stream->Size()) { if (fHeader->MaximumSize() != stream->Size()) {
FATAL(("B+tree header size %Ld doesn't fit file size %Ld!\n", dprintf("B+tree header size %Ld doesn't fit file size %Ld!\n",
fHeader->MaximumSize(), stream->Size())); fHeader->MaximumSize(), stream->Size());
// we can't change the header since we don't have a transaction // we can't change the header since we don't have a transaction
//fHeader->maximum_size = HOST_ENDIAN_TO_BFS_INT64(stream->Size()); //fHeader->maximum_size = HOST_ENDIAN_TO_BFS_INT64(stream->Size());
} }
@@ -365,7 +365,7 @@ dump_block_run_array(int argc, char** argv)
return 0; return 0;
} }
block_run* runs = (block_run*)parse_expression(argv[1]); const block_run* runs = (const block_run*)parse_expression(argv[1]);
uint32 count = 16; uint32 count = 16;
if (argc > 2) if (argc > 2)
count = parse_expression(argv[2]); count = parse_expression(argv[2]);
@@ -427,6 +427,7 @@ remove_debugger_commands()
remove_debugger_command("bfs_btree_header", dump_bplustree_header); remove_debugger_command("bfs_btree_header", dump_bplustree_header);
remove_debugger_command("bfs_btree_node", dump_bplustree_node); remove_debugger_command("bfs_btree_node", dump_bplustree_node);
remove_debugger_command("bfs", dump_volume); remove_debugger_command("bfs", dump_volume);
remove_debugger_command("bfs_block_runs", dump_block_run_array);
} }
+4 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2007, Axel Dörfler, [email protected]. * Copyright 2001-2008, Axel Dörfler, [email protected].
* This file may be used under the terms of the MIT License. * This file may be used under the terms of the MIT License.
*/ */
#ifndef DEBUG_H #ifndef DEBUG_H
@@ -67,7 +67,7 @@
#define REPORT_ERROR(status) \ #define REPORT_ERROR(status) \
__out("bfs: %s:%d: %s\n", __FUNCTION__, __LINE__, strerror(status)); __out("bfs: %s:%d: %s\n", __FUNCTION__, __LINE__, strerror(status));
#define RETURN_ERROR(err) { status_t _status = err; if (_status < B_OK) REPORT_ERROR(_status); return _status;} #define RETURN_ERROR(err) { status_t _status = err; if (_status < B_OK) REPORT_ERROR(_status); return _status;}
// #define FATAL(x) { __out("bfs: "); __out x; sync(); panic("BFS!\n"); } // #define FATAL(x) { panic x; }
#define FATAL(x) { __out("bfs: "); __out x; } #define FATAL(x) { __out("bfs: "); __out x; }
#define INFORM(x) { __out("bfs: "); __out x; } #define INFORM(x) { __out("bfs: "); __out x; }
#define FUNCTION() ; #define FUNCTION() ;
@@ -88,9 +88,9 @@
struct disk_super_block; struct disk_super_block;
class Inode; class Inode;
class Volume; class Volume;
// some structure dump functions // some structure dump functions
extern void dump_block_run(const char *prefix, block_run &run); extern void dump_block_run(const char *prefix, const block_run &run);
extern void dump_super_block(const disk_super_block *superBlock); extern void dump_super_block(const disk_super_block *superBlock);
extern void dump_data_stream(const data_stream *stream); extern void dump_data_stream(const data_stream *stream);
extern void dump_inode(const bfs_inode *inode); extern void dump_inode(const bfs_inode *inode);