* 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:
Axel Dörfler
2008-03-25 19:21:01 +00:00
parent 5da3fbc8ef
commit cd31b326a3
+3 -3
View File
@@ -88,7 +88,7 @@ class Action : public AbstractTraceEntry {
fNumBlocks(transaction->num_blocks), fNumBlocks(transaction->num_blocks),
fSubNumBlocks(transaction->sub_num_blocks) fSubNumBlocks(transaction->sub_num_blocks)
{ {
strlcpy(fLabel, label, sizeof(label)); strlcpy(fLabel, label, sizeof(fLabel));
Initialized(); Initialized();
} }
@@ -917,10 +917,10 @@ dump_cache(int argc, char **argv)
off_t blockNumber = -1; off_t blockNumber = -1;
if (i + 1 < argc) { 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, cached_block *block = (cached_block *)hash_lookup(cache->hash,
&blockNumber); &blockNumber);
if (cache != NULL) { if (block != NULL) {
kprintf("BLOCK %p\n", block); kprintf("BLOCK %p\n", block);
kprintf(" current data: %p\n", block->current_data); kprintf(" current data: %p\n", block->current_data);
kprintf(" original data: %p\n", block->original_data); kprintf(" original data: %p\n", block->original_data);