mirror of
https://review.haiku-os.org/haiku
synced 2025-01-20 21:41:28 +01:00
Replaced "%Ld" and "%lld" in printf()s by the new B_PRI* macros to avoid
warnings when building with a 64 bit compiler. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1fee9fcf21
commit
8859eeab53
@ -110,8 +110,9 @@ CachedNode::SetTo(off_t offset, bool check)
|
||||
if (InternalSetTo(NULL, offset) != NULL && check) {
|
||||
// sanity checks (links, all_key_count)
|
||||
if (!fTree->fHeader->CheckNode(fNode)) {
|
||||
FATAL(("invalid node [%p] read from offset %Ld (block %Ld), inode "
|
||||
"at %Ld\n", fNode, offset, fBlockNumber, fTree->fStream->ID()));
|
||||
FATAL(("invalid node [%p] read from offset %" B_PRIdOFF " (block %"
|
||||
B_PRIdOFF "), inode at %" B_PRIdINO "\n", fNode, offset,
|
||||
fBlockNumber, fTree->fStream->ID()));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@ -140,8 +141,9 @@ CachedNode::SetToWritable(Transaction& transaction, off_t offset, bool check)
|
||||
if (InternalSetTo(&transaction, offset) != NULL && check) {
|
||||
// sanity checks (links, all_key_count)
|
||||
if (!fTree->fHeader->CheckNode(fNode)) {
|
||||
FATAL(("invalid node [%p] read from offset %Ld (block %Ld), inode "
|
||||
"at %Ld\n", fNode, offset, fBlockNumber, fTree->fStream->ID()));
|
||||
FATAL(("invalid node [%p] read from offset %" B_PRIdOFF " (block %"
|
||||
B_PRIdOFF "), inode at %" B_PRIdINO "\n", fNode, offset,
|
||||
fBlockNumber, fTree->fStream->ID()));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@ -455,8 +457,8 @@ BPlusTree::SetTo(Inode* stream)
|
||||
// is header valid?
|
||||
|
||||
if (fHeader->MaximumSize() != stream->Size()) {
|
||||
dprintf("B+tree header size %Ld doesn't fit file size %Ld!\n",
|
||||
fHeader->MaximumSize(), stream->Size());
|
||||
dprintf("B+tree header size %" B_PRIdOFF " doesn't fit file size %"
|
||||
B_PRIdOFF "!\n", fHeader->MaximumSize(), stream->Size());
|
||||
// we can't change the header since we don't have a transaction
|
||||
//fHeader->maximum_size = HOST_ENDIAN_TO_BFS_INT64(stream->Size());
|
||||
}
|
||||
@ -727,7 +729,7 @@ BPlusTree::_SeekDown(Stack<node_and_key>& stack, const uint8* key,
|
||||
nodeAndKey.nodeOffset = nextOffset;
|
||||
}
|
||||
|
||||
FATAL(("BPlusTree::_SeekDown() could not open node %Ld\n",
|
||||
FATAL(("BPlusTree::_SeekDown() could not open node %" B_PRIdOFF "\n",
|
||||
nodeAndKey.nodeOffset));
|
||||
return B_ERROR;
|
||||
}
|
||||
@ -752,7 +754,8 @@ BPlusTree::_FindFreeDuplicateFragment(Transaction& transaction,
|
||||
const bplustree_node* fragment = cached.SetTo(
|
||||
bplustree_node::FragmentOffset(value), false);
|
||||
if (fragment == NULL) {
|
||||
FATAL(("Could not get duplicate fragment at %Ld\n", value));
|
||||
FATAL(("Could not get duplicate fragment at %" B_PRIdOFF "\n",
|
||||
value));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -804,7 +807,7 @@ BPlusTree::_InsertDuplicate(Transaction& transaction, CachedNode& cached,
|
||||
if (array->count > NUM_FRAGMENT_VALUES
|
||||
|| array->count < 1) {
|
||||
FATAL(("insertDuplicate: Invalid array[%d] size in fragment "
|
||||
"%Ld == %Ld!\n",
|
||||
"%" B_PRIdOFF " == %" B_PRIdOFF "!\n",
|
||||
(int)bplustree_node::FragmentIndex(oldValue),
|
||||
bplustree_node::FragmentOffset(oldValue), array->count));
|
||||
return B_BAD_DATA;
|
||||
@ -878,8 +881,9 @@ BPlusTree::_InsertDuplicate(Transaction& transaction, CachedNode& cached,
|
||||
|
||||
array = duplicate->DuplicateArray();
|
||||
if (array->count > NUM_DUPLICATE_VALUES || array->count < 0) {
|
||||
FATAL(("removeDuplicate: Invalid array size in duplicate %Ld "
|
||||
"== %Ld!\n", duplicateOffset, array->count));
|
||||
FATAL(("removeDuplicate: Invalid array size in duplicate %"
|
||||
B_PRIdOFF " == %" B_PRIdOFF "!\n", duplicateOffset,
|
||||
array->count));
|
||||
return B_BAD_DATA;
|
||||
}
|
||||
} while (array->count >= NUM_DUPLICATE_VALUES
|
||||
@ -1427,14 +1431,15 @@ BPlusTree::_RemoveDuplicate(Transaction& transaction,
|
||||
|
||||
if (array->count > NUM_FRAGMENT_VALUES
|
||||
|| array->count < 1) {
|
||||
FATAL(("removeDuplicate: Invalid array[%d] size in fragment %Ld "
|
||||
"== %Ld!\n", (int)bplustree_node::FragmentIndex(oldValue),
|
||||
duplicateOffset, array->count));
|
||||
FATAL(("removeDuplicate: Invalid array[%d] size in fragment %"
|
||||
B_PRIdOFF " == %" B_PRIdOFF "!\n",
|
||||
(int)bplustree_node::FragmentIndex(oldValue), duplicateOffset,
|
||||
array->count));
|
||||
return B_BAD_DATA;
|
||||
}
|
||||
if (!array->Remove(value)) {
|
||||
FATAL(("Oh no, value %Ld not found in fragments of node %Ld...\n",
|
||||
value, duplicateOffset));
|
||||
FATAL(("Oh no, value %" B_PRIdOFF " not found in fragments of node "
|
||||
"%" B_PRIdOFF "...\n", value, duplicateOffset));
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -1464,8 +1469,8 @@ BPlusTree::_RemoveDuplicate(Transaction& transaction,
|
||||
duplicate_array* array = NULL;
|
||||
|
||||
if (duplicate->LeftLink() != BPLUSTREE_NULL) {
|
||||
FATAL(("invalid duplicate node: first left link points to %Ld!\n",
|
||||
duplicate->LeftLink()));
|
||||
FATAL(("invalid duplicate node: first left link points to %" B_PRIdOFF
|
||||
"!\n", duplicate->LeftLink()));
|
||||
return B_BAD_DATA;
|
||||
}
|
||||
|
||||
@ -1474,8 +1479,9 @@ BPlusTree::_RemoveDuplicate(Transaction& transaction,
|
||||
array = duplicate->DuplicateArray();
|
||||
if (array->count > NUM_DUPLICATE_VALUES
|
||||
|| array->count < 0) {
|
||||
FATAL(("removeDuplicate: Invalid array size in duplicate %Ld == "
|
||||
"%Ld!\n", duplicateOffset, array->count));
|
||||
FATAL(("removeDuplicate: Invalid array size in duplicate %"
|
||||
B_PRIdOFF " == %" B_PRIdOFF "!\n", duplicateOffset,
|
||||
array->count));
|
||||
return B_BAD_DATA;
|
||||
}
|
||||
|
||||
@ -1886,7 +1892,7 @@ BPlusTree::Find(const uint8* key, uint16 keyLength, off_t* _value)
|
||||
|
||||
nodeOffset = nextOffset;
|
||||
}
|
||||
FATAL(("b+tree node at %Ld could not be loaded\n", nodeOffset));
|
||||
FATAL(("b+tree node at %" B_PRIdOFF " could not be loaded\n", nodeOffset));
|
||||
RETURN_ERROR(B_ERROR);
|
||||
}
|
||||
|
||||
|
@ -705,8 +705,8 @@ BlockAllocator::_Initialize(BlockAllocator* allocator)
|
||||
if (volume->UsedBlocks() != usedBlocks) {
|
||||
// If the disk in a dirty state at mount time, it's
|
||||
// normal that the values don't match
|
||||
INFORM(("volume reports %Ld used blocks, correct is %Ld\n",
|
||||
volume->UsedBlocks(), usedBlocks));
|
||||
INFORM(("volume reports %" B_PRIdOFF " used blocks, correct is %"
|
||||
B_PRIdOFF "\n", volume->UsedBlocks(), usedBlocks));
|
||||
volume->SuperBlock().used_blocks = HOST_ENDIAN_TO_BFS_INT64(usedBlocks);
|
||||
}
|
||||
|
||||
@ -1379,7 +1379,7 @@ BlockAllocator::CheckNextNode(check_control* control)
|
||||
Vnode vnode(fVolume, cookie->current);
|
||||
Inode* inode;
|
||||
if (vnode.Get(&inode) != B_OK) {
|
||||
FATAL(("check: Could not open inode at %Ld\n",
|
||||
FATAL(("check: Could not open inode at %" B_PRIdOFF "\n",
|
||||
fVolume->ToBlock(cookie->current)));
|
||||
continue;
|
||||
}
|
||||
@ -1402,8 +1402,8 @@ BlockAllocator::CheckNextNode(check_control* control)
|
||||
|
||||
BPlusTree* tree = inode->Tree();
|
||||
if (tree == NULL) {
|
||||
FATAL(("check: could not open b+tree from inode at %Ld\n",
|
||||
fVolume->ToBlock(cookie->current)));
|
||||
FATAL(("check: could not open b+tree from inode at %" B_PRIdOFF
|
||||
"\n", fVolume->ToBlock(cookie->current)));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1455,7 +1455,7 @@ BlockAllocator::CheckNextNode(check_control* control)
|
||||
Vnode vnode(fVolume, id);
|
||||
Inode* inode;
|
||||
if (vnode.Get(&inode) != B_OK) {
|
||||
FATAL(("Could not open inode ID %Ld!\n", id));
|
||||
FATAL(("Could not open inode ID %" B_PRIdINO "!\n", id));
|
||||
control->errors |= BFS_COULD_NOT_OPEN;
|
||||
|
||||
if ((control->flags & BFS_REMOVE_INVALID) != 0) {
|
||||
@ -1506,9 +1506,10 @@ BlockAllocator::CheckNextNode(check_control* control)
|
||||
&& !inode->IsIndex())
|
||||
|| (is_directory(cookie->parent_mode)
|
||||
&& !inode->IsRegularNode())) {
|
||||
FATAL(("inode at %Ld is of wrong type: %o (parent %o at %Ld)!"
|
||||
"\n", inode->BlockNumber(), inode->Mode(),
|
||||
cookie->parent_mode, cookie->parent->BlockNumber()));
|
||||
FATAL(("inode at %" B_PRIdOFF " is of wrong type: %o (parent "
|
||||
"%o at %" B_PRIdOFF ")!\n", inode->BlockNumber(),
|
||||
inode->Mode(), cookie->parent_mode,
|
||||
cookie->parent->BlockNumber()));
|
||||
|
||||
// if we are allowed to fix errors, we should remove the file
|
||||
if ((control->flags & BFS_REMOVE_WRONG_TYPES) != 0
|
||||
@ -1701,14 +1702,14 @@ BlockAllocator::CheckBlockRun(block_run run, const char* type,
|
||||
if (firstSet == -1) {
|
||||
firstSet = firstGroupBlock + offset;
|
||||
control->errors |= BFS_BLOCKS_ALREADY_SET;
|
||||
dprintf("block %lld is already set!!!\n",
|
||||
dprintf("block %" B_PRIdOFF " is already set!!!\n",
|
||||
firstGroupBlock + offset);
|
||||
}
|
||||
control->stats.already_set++;
|
||||
} else {
|
||||
if (firstSet != -1) {
|
||||
FATAL(("%s: block_run(%d, %u, %u): blocks %Ld - %Ld "
|
||||
"are already set!\n", type,
|
||||
FATAL(("%s: block_run(%d, %u, %u): blocks %" B_PRIdOFF
|
||||
" - %" B_PRIdOFF " are already set!\n", type,
|
||||
(int)run.AllocationGroup(), run.Start(),
|
||||
run.Length(), firstSet,
|
||||
firstGroupBlock + offset - 1));
|
||||
@ -1729,9 +1730,10 @@ BlockAllocator::CheckBlockRun(block_run run, const char* type,
|
||||
firstGroupBlock + pos + block * bitsPerBlock - 1));
|
||||
}
|
||||
if (firstSet != -1) {
|
||||
FATAL(("%s: block_run(%d, %u, %u): blocks %Ld - %Ld are "
|
||||
"already set!\n", type, (int)run.AllocationGroup(),
|
||||
run.Start(), run.Length(), firstSet,
|
||||
FATAL(("%s: block_run(%d, %u, %u): blocks %" B_PRIdOFF " - %"
|
||||
B_PRIdOFF " are already set!\n", type,
|
||||
(int)run.AllocationGroup(), run.Start(), run.Length(),
|
||||
firstSet,
|
||||
firstGroupBlock + pos + block * bitsPerBlock - 1));
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ dump_super_block(const disk_super_block* superBlock)
|
||||
get_tupel(superBlock->fs_byte_order));
|
||||
kprintf(" block_size = %u\n", (unsigned)superBlock->BlockSize());
|
||||
kprintf(" block_shift = %u\n", (unsigned)superBlock->BlockShift());
|
||||
kprintf(" num_blocks = %Lu\n", superBlock->NumBlocks());
|
||||
kprintf(" used_blocks = %Lu\n", superBlock->UsedBlocks());
|
||||
kprintf(" num_blocks = %" B_PRIdOFF "\n", superBlock->NumBlocks());
|
||||
kprintf(" used_blocks = %" B_PRIdOFF "\n", superBlock->UsedBlocks());
|
||||
kprintf(" inode_size = %u\n", (unsigned)superBlock->InodeSize());
|
||||
kprintf(" magic2 = %#08x (%s) %s\n", (int)superBlock->Magic2(),
|
||||
get_tupel(superBlock->magic2),
|
||||
@ -67,8 +67,8 @@ dump_super_block(const disk_super_block* superBlock)
|
||||
kprintf(" flags = %#08x (%s)\n", (int)superBlock->Flags(),
|
||||
get_tupel(superBlock->Flags()));
|
||||
dump_block_run(" log_blocks = ", superBlock->log_blocks);
|
||||
kprintf(" log_start = %Lu\n", superBlock->LogStart());
|
||||
kprintf(" log_end = %Lu\n", superBlock->LogEnd());
|
||||
kprintf(" log_start = %" B_PRIdOFF "\n", superBlock->LogStart());
|
||||
kprintf(" log_end = %" B_PRIdOFF "\n", superBlock->LogEnd());
|
||||
kprintf(" magic3 = %#08x (%s) %s\n", (int)superBlock->Magic3(),
|
||||
get_tupel(superBlock->magic3),
|
||||
(superBlock->magic3 == SUPER_BLOCK_MAGIC3 ? "valid" : "INVALID"));
|
||||
@ -87,21 +87,23 @@ dump_data_stream(const data_stream* stream)
|
||||
dump_block_run("", stream->direct[i]);
|
||||
}
|
||||
}
|
||||
kprintf(" max_direct_range = %Lu\n", stream->MaxDirectRange());
|
||||
kprintf(" max_direct_range = %" B_PRIdOFF "\n",
|
||||
stream->MaxDirectRange());
|
||||
|
||||
if (!stream->indirect.IsZero())
|
||||
dump_block_run(" indirect = ", stream->indirect);
|
||||
|
||||
kprintf(" max_indirect_range = %Lu\n", stream->MaxIndirectRange());
|
||||
kprintf(" max_indirect_range = %" B_PRIdOFF "\n",
|
||||
stream->MaxIndirectRange());
|
||||
|
||||
if (!stream->double_indirect.IsZero()) {
|
||||
dump_block_run(" double_indirect = ",
|
||||
stream->double_indirect);
|
||||
}
|
||||
|
||||
kprintf(" max_double_indirect_range = %Lu\n",
|
||||
kprintf(" max_double_indirect_range = %" B_PRIdOFF "\n",
|
||||
stream->MaxDoubleIndirectRange());
|
||||
kprintf(" size = %Lu\n", stream->Size());
|
||||
kprintf(" size = %" B_PRIdOFF "\n", stream->Size());
|
||||
}
|
||||
|
||||
|
||||
@ -117,14 +119,14 @@ dump_inode(const bfs_inode* inode)
|
||||
kprintf(" gid = %u\n", (unsigned)inode->GroupID());
|
||||
kprintf(" mode = %08x\n", (int)inode->Mode());
|
||||
kprintf(" flags = %08x\n", (int)inode->Flags());
|
||||
kprintf(" create_time = %llx (%ld.%u)\n", inode->CreateTime(),
|
||||
bfs_inode::ToSecs(inode->CreateTime()),
|
||||
kprintf(" create_time = %" B_PRIx64 " (%ld.%u)\n",
|
||||
inode->CreateTime(), bfs_inode::ToSecs(inode->CreateTime()),
|
||||
(unsigned)bfs_inode::ToUsecs(inode->CreateTime()));
|
||||
kprintf(" last_modified_time = %llx (%ld.%u)\n", inode->LastModifiedTime(),
|
||||
bfs_inode::ToSecs(inode->LastModifiedTime()),
|
||||
kprintf(" last_modified_time = %" B_PRIx64 " (%ld.%u)\n",
|
||||
inode->LastModifiedTime(), bfs_inode::ToSecs(inode->LastModifiedTime()),
|
||||
(unsigned)bfs_inode::ToUsecs(inode->LastModifiedTime()));
|
||||
kprintf(" status_change_time = %llx (%ld.%u)\n", inode->StatusChangeTime(),
|
||||
bfs_inode::ToSecs(inode->StatusChangeTime()),
|
||||
kprintf(" status_change_time = %" B_PRIx64 " (%ld.%u)\n",
|
||||
inode->StatusChangeTime(), bfs_inode::ToSecs(inode->StatusChangeTime()),
|
||||
(unsigned)bfs_inode::ToUsecs(inode->StatusChangeTime()));
|
||||
dump_block_run( " parent = ", inode->parent);
|
||||
dump_block_run( " attributes = ", inode->attributes);
|
||||
@ -150,9 +152,9 @@ dump_bplustree_header(const bplustree_header* header)
|
||||
kprintf(" max_number_of_levels = %u\n",
|
||||
(unsigned)header->MaxNumberOfLevels());
|
||||
kprintf(" data_type = %u\n", (unsigned)header->DataType());
|
||||
kprintf(" root_node_pointer = %Ld\n", header->RootNode());
|
||||
kprintf(" free_node_pointer = %Ld\n", header->FreeNode());
|
||||
kprintf(" maximum_size = %Lu\n", header->MaximumSize());
|
||||
kprintf(" root_node_pointer = %" B_PRIdOFF "\n", header->RootNode());
|
||||
kprintf(" free_node_pointer = %" B_PRIdOFF "\n", header->FreeNode());
|
||||
kprintf(" maximum_size = %" B_PRIdOFF "\n", header->MaximumSize());
|
||||
}
|
||||
|
||||
|
||||
@ -196,9 +198,9 @@ dump_bplustree_node(const bplustree_node* node, const bplustree_header* header,
|
||||
Volume* volume)
|
||||
{
|
||||
kprintf("bplustree_node:\n");
|
||||
kprintf(" left_link = %Ld\n", node->left_link);
|
||||
kprintf(" right_link = %Ld\n", node->right_link);
|
||||
kprintf(" overflow_link = %Ld\n", node->overflow_link);
|
||||
kprintf(" left_link = %" B_PRId64 "\n", node->left_link);
|
||||
kprintf(" right_link = %" B_PRId64 "\n", node->right_link);
|
||||
kprintf(" overflow_link = %" B_PRId64 "\n", node->overflow_link);
|
||||
kprintf(" all_key_count = %u\n", node->all_key_count);
|
||||
kprintf(" all_key_length = %u\n", node->all_key_length);
|
||||
|
||||
@ -240,24 +242,25 @@ dump_bplustree_node(const bplustree_node* node, const bplustree_header* header,
|
||||
kprintf("uint32 = %u (0x%x)", (unsigned)*(uint32 *)&buffer,
|
||||
(unsigned)*(uint32 *)&buffer);
|
||||
} else if (header->data_type == BPLUSTREE_INT64_TYPE) {
|
||||
kprintf("int64 = %Ld (0x%Lx)", *(int64 *)&buffer,
|
||||
*(int64 *)&buffer);
|
||||
kprintf("int64 = %" B_PRId64 " (%#" B_PRIx64 ")",
|
||||
*(int64 *)&buffer, *(int64 *)&buffer);
|
||||
} else
|
||||
kprintf("???");
|
||||
|
||||
off_t offset = *value & 0x3fffffffffffffffLL;
|
||||
kprintf(" (%d bytes) -> %Ld", length, offset);
|
||||
kprintf(" (%d bytes) -> %" B_PRIdOFF, length, offset);
|
||||
if (volume != NULL) {
|
||||
block_run run = volume->ToBlockRun(offset);
|
||||
kprintf(" (%d, %d)", (int)run.allocation_group, run.start);
|
||||
}
|
||||
if (bplustree_node::LinkType(*value)
|
||||
== BPLUSTREE_DUPLICATE_FRAGMENT)
|
||||
kprintf(" (duplicate fragment %Ld)\n", *value & 0x3ff);
|
||||
else if (bplustree_node::LinkType(*value)
|
||||
== BPLUSTREE_DUPLICATE_NODE)
|
||||
== BPLUSTREE_DUPLICATE_FRAGMENT) {
|
||||
kprintf(" (duplicate fragment %" B_PRIdOFF ")\n",
|
||||
*value & 0x3ff);
|
||||
} else if (bplustree_node::LinkType(*value)
|
||||
== BPLUSTREE_DUPLICATE_NODE) {
|
||||
kprintf(" (duplicate node)\n");
|
||||
else
|
||||
} else
|
||||
kprintf("\n");
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ InodeAllocator::Keep(fs_vnode_ops* vnodeOps, uint32 publishFlags)
|
||||
|
||||
status_t status = fInode->WriteBack(*fTransaction);
|
||||
if (status < B_OK) {
|
||||
FATAL(("writing new inode %Ld failed!\n", fInode->ID()));
|
||||
FATAL(("writing new inode %" B_PRIdINO " failed!\n", fInode->ID()));
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -412,7 +412,7 @@ Inode::InitCheck(bool checkNode)
|
||||
return B_BUSY;
|
||||
|
||||
if (status != B_OK) {
|
||||
FATAL(("inode at block %Ld corrupt!\n", BlockNumber()));
|
||||
FATAL(("inode at block %" B_PRIdOFF " corrupt!\n", BlockNumber()));
|
||||
RETURN_ERROR(B_BAD_DATA);
|
||||
}
|
||||
}
|
||||
@ -424,7 +424,8 @@ Inode::InitCheck(bool checkNode)
|
||||
|
||||
status_t status = fTree->InitCheck();
|
||||
if (status != B_OK) {
|
||||
FATAL(("inode tree at block %Ld corrupt!\n", BlockNumber()));
|
||||
FATAL(("inode tree at block %" B_PRIdOFF " corrupt!\n",
|
||||
BlockNumber()));
|
||||
RETURN_ERROR(B_BAD_DATA);
|
||||
}
|
||||
}
|
||||
@ -2781,7 +2782,7 @@ AttributeIterator::GetNext(char* name, size_t* _length, uint32* _type,
|
||||
if (get_vnode(volume->FSVolume(), volume->ToVnode(fInode->Attributes()),
|
||||
(void**)&fAttributes) != B_OK) {
|
||||
FATAL(("get_vnode() failed in AttributeIterator::GetNext(ino_t"
|
||||
" = %Ld,name = \"%s\")\n", fInode->ID(), name));
|
||||
" = %" B_PRIdINO ",name = \"%s\")\n", fInode->ID(), name));
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -2789,7 +2790,7 @@ AttributeIterator::GetNext(char* name, size_t* _length, uint32* _type,
|
||||
if (tree == NULL
|
||||
|| (fIterator = new TreeIterator(tree)) == NULL) {
|
||||
FATAL(("could not get tree in AttributeIterator::GetNext(ino_t"
|
||||
" = %Ld,name = \"%s\")\n", fInode->ID(), name));
|
||||
" = %" B_PRIdINO ",name = \"%s\")\n", fInode->ID(), name));
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@ -518,7 +518,7 @@ Journal::_ReplayRunArray(int32* _start)
|
||||
|
||||
for (int32 index = 0; index < array->CountRuns(); index++) {
|
||||
const block_run& run = array->RunAt(index);
|
||||
INFORM(("replay block run %u:%u:%u in log at %Ld!\n",
|
||||
INFORM(("replay block run %u:%u:%u in log at %" B_PRIdOFF "!\n",
|
||||
(int)run.AllocationGroup(), run.Start(), run.Length(), blockNumber));
|
||||
|
||||
off_t offset = fVolume->ToOffset(run);
|
||||
|
@ -1068,8 +1068,8 @@ Equation::GetNextMatching(Volume* volume, TreeIterator* iterator,
|
||||
Inode* inode;
|
||||
if ((status = vnode.Get(&inode)) != B_OK) {
|
||||
REPORT_ERROR(status);
|
||||
FATAL(("could not get inode %Ld in index \"%s\"!\n", offset,
|
||||
fAttribute));
|
||||
FATAL(("could not get inode %" B_PRIdOFF " in index \"%s\"!\n",
|
||||
offset, fAttribute));
|
||||
// try with next
|
||||
continue;
|
||||
}
|
||||
@ -1124,7 +1124,7 @@ Equation::GetNextMatching(Volume* volume, TreeIterator* iterator,
|
||||
dirent->d_pino = volume->ToVnode(inode->Parent());
|
||||
|
||||
if (inode->GetName(dirent->d_name) < B_OK) {
|
||||
FATAL(("inode %Ld in query has no name!\n",
|
||||
FATAL(("inode %" B_PRIdOFF " in query has no name!\n",
|
||||
inode->BlockNumber()));
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ bfs_mount(fs_volume* _volume, const char* device, uint32 flags,
|
||||
_volume->ops = &gBFSVolumeOps;
|
||||
*_rootID = volume->ToVnode(volume->Root());
|
||||
|
||||
INFORM(("mounted \"%s\" (root node at %lld, device = %s)\n",
|
||||
INFORM(("mounted \"%s\" (root node at %" B_PRIdINO ", device = %s)\n",
|
||||
volume->Name(), *_rootID, device));
|
||||
return B_OK;
|
||||
}
|
||||
@ -275,23 +275,23 @@ bfs_get_vnode(fs_volume* _volume, ino_t id, fs_vnode* _node, int* _type,
|
||||
// the hassle and try to load an earlier block from disk
|
||||
if (id < volume->ToBlock(volume->Log()) + volume->Log().Length()
|
||||
|| id > volume->NumBlocks()) {
|
||||
INFORM(("inode at %Ld requested!\n", id));
|
||||
INFORM(("inode at %" B_PRIdINO " requested!\n", id));
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
CachedBlock cached(volume, id);
|
||||
bfs_inode* node = (bfs_inode*)cached.Block();
|
||||
if (node == NULL) {
|
||||
FATAL(("could not read inode: %Ld\n", id));
|
||||
FATAL(("could not read inode: %" B_PRIdINO "\n", id));
|
||||
return B_IO_ERROR;
|
||||
}
|
||||
|
||||
status_t status = node->InitCheck(volume);
|
||||
if (status != B_OK) {
|
||||
if ((node->Flags() & INODE_DELETED) != 0) {
|
||||
INFORM(("inode at %Ld is already deleted!\n", id));
|
||||
INFORM(("inode at %" B_PRIdINO " is already deleted!\n", id));
|
||||
} else {
|
||||
FATAL(("inode at %Ld could not be read: %s!\n", id,
|
||||
FATAL(("inode at %" B_PRIdINO " could not be read: %s!\n", id,
|
||||
strerror(status)));
|
||||
}
|
||||
return status;
|
||||
@ -1393,8 +1393,9 @@ bfs_free_cookie(fs_volume* _volume, fs_vnode* _node, void* _cookie)
|
||||
if (needsTrimming) {
|
||||
status = inode->TrimPreallocation(transaction);
|
||||
if (status < B_OK) {
|
||||
FATAL(("Could not trim preallocated blocks: inode %Ld, transaction %d: %s!\n",
|
||||
inode->ID(), (int)transaction.ID(), strerror(status)));
|
||||
FATAL(("Could not trim preallocated blocks: inode %" B_PRIdINO
|
||||
", transaction %d: %s!\n", inode->ID(),
|
||||
(int)transaction.ID(), strerror(status)));
|
||||
|
||||
// we still want this transaction to succeed
|
||||
status = B_OK;
|
||||
@ -2244,8 +2245,8 @@ bfs_initialize(int fd, partition_id partitionID, const char* name,
|
||||
|
||||
INFORM(("Disk was initialized successfully.\n"));
|
||||
INFORM(("\tname: \"%s\"\n", super.name));
|
||||
INFORM(("\tnum blocks: %Ld\n", super.NumBlocks()));
|
||||
INFORM(("\tused blocks: %Ld\n", super.UsedBlocks()));
|
||||
INFORM(("\tnum blocks: %" B_PRIdOFF "\n", super.NumBlocks()));
|
||||
INFORM(("\tused blocks: %" B_PRIdOFF "\n", super.UsedBlocks()));
|
||||
INFORM(("\tblock size: %u bytes\n", (unsigned)super.BlockSize()));
|
||||
INFORM(("\tnum allocation groups: %d\n",
|
||||
(int)super.AllocationGroups()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user