* The "block_cache" command checked the wrong variable to see if a block
could be found or not, eventually resulting in a read fault. * It now also uses parse_expression() for its second argument, since it now returns an uint64 in Haiku. * Tracing output cut off the label too early. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24579 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+3
-3
@@ -88,7 +88,7 @@ class Action : public AbstractTraceEntry {
|
||||
fNumBlocks(transaction->num_blocks),
|
||||
fSubNumBlocks(transaction->sub_num_blocks)
|
||||
{
|
||||
strlcpy(fLabel, label, sizeof(label));
|
||||
strlcpy(fLabel, label, sizeof(fLabel));
|
||||
Initialized();
|
||||
}
|
||||
|
||||
@@ -917,10 +917,10 @@ dump_cache(int argc, char **argv)
|
||||
|
||||
off_t blockNumber = -1;
|
||||
if (i + 1 < argc) {
|
||||
blockNumber = strtoll(argv[i + 1], NULL, 0);
|
||||
blockNumber = parse_expression(argv[i + 1]);
|
||||
cached_block *block = (cached_block *)hash_lookup(cache->hash,
|
||||
&blockNumber);
|
||||
if (cache != NULL) {
|
||||
if (block != NULL) {
|
||||
kprintf("BLOCK %p\n", block);
|
||||
kprintf(" current data: %p\n", block->current_data);
|
||||
kprintf(" original data: %p\n", block->original_data);
|
||||
|
||||
Reference in New Issue
Block a user