* Added KDL command "bfs_block_runs" which shows the blocks runs in an array.
* The "bfs" KDL command now also accepts ',' as group/start delimiter in a block_run. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26793 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e8f39ce96a
commit
1a168f3f1f
@ -321,7 +321,7 @@ dump_volume(int argc, char** argv)
|
||||
// convert block_runs/offsets
|
||||
for (int i = 2; i < argc; i++) {
|
||||
char* arg = argv[i];
|
||||
if (strchr(arg, '.') != NULL) {
|
||||
if (strchr(arg, '.') != NULL || strchr(arg, ',') != NULL) {
|
||||
// block_run to offset
|
||||
block_run run;
|
||||
run.allocation_group = HOST_ENDIAN_TO_BFS_INT32(
|
||||
@ -357,6 +357,28 @@ dump_volume(int argc, char** argv)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dump_block_run_array(int argc, char** argv)
|
||||
{
|
||||
if (argc < 2 || !strcmp(argv[1], "--help")) {
|
||||
kprintf("usage: %s <ptr-to-array> [number-of-runs]\n", argv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
block_run* runs = (block_run*)parse_expression(argv[1]);
|
||||
uint32 count = 16;
|
||||
if (argc > 2)
|
||||
count = parse_expression(argv[2]);
|
||||
|
||||
for (uint32 i = 0; i < count; i++) {
|
||||
dprintf("[%3lu] ", i);
|
||||
dump_block_run("", runs[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dump_bplustree_node(int argc, char** argv)
|
||||
{
|
||||
@ -421,6 +443,8 @@ add_debugger_commands()
|
||||
add_debugger_command("bfs_btree_node", dump_bplustree_node,
|
||||
"dump a BFS B+tree node");
|
||||
add_debugger_command("bfs", dump_volume, "dump a BFS volume");
|
||||
add_debugger_command("bfs_block_runs", dump_block_run_array,
|
||||
"dump a block run array");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user