* Removed +1 in calculating utf string length as the null char was already included
* Improved debug output git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27175 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c5855c9ef4
commit
0650565811
@ -81,7 +81,7 @@ AllocationDescriptorList<Accessor>::AllocationDescriptorList(Icb *icb,
|
|||||||
fReadFromIcb(true),
|
fReadFromIcb(true),
|
||||||
fVolume(icb->GetVolume())
|
fVolume(icb->GetVolume())
|
||||||
{
|
{
|
||||||
TRACE(("AllocationDescriptorList<>\n"));
|
TRACE(("AllocationDescriptorList<>::AllocationDescriptorList\n"));
|
||||||
_WalkContinuationChain(_CurrentDescriptor());
|
_WalkContinuationChain(_CurrentDescriptor());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ status_t
|
|||||||
AllocationDescriptorList<Accessor>::FindExtent(off_t start,
|
AllocationDescriptorList<Accessor>::FindExtent(off_t start,
|
||||||
long_address *extent, bool *isEmpty)
|
long_address *extent, bool *isEmpty)
|
||||||
{
|
{
|
||||||
TRACE(("UDF: AllocationDescriptorList<>::FindExtent: start: %Ld, "
|
TRACE(("AllocationDescriptorList<>::FindExtent: start: %Ld, "
|
||||||
"extent: %p, isEmpty: %p\n", start, extent, isEmpty));
|
"extent: %p, isEmpty: %p\n", start, extent, isEmpty));
|
||||||
|
|
||||||
off_t startBlock = start >> fVolume->BlockShift();
|
off_t startBlock = start >> fVolume->BlockShift();
|
||||||
@ -149,11 +149,12 @@ template<class Accessor>
|
|||||||
AllocationDescriptorList<Accessor>::Descriptor*
|
AllocationDescriptorList<Accessor>::Descriptor*
|
||||||
AllocationDescriptorList<Accessor>::_CurrentDescriptor() const
|
AllocationDescriptorList<Accessor>::_CurrentDescriptor() const
|
||||||
{
|
{
|
||||||
TRACE(("AllocationDescriptorList<>::_CurrentDescriptor: "
|
TRACE(("AllocationDescriptorList<>::_CurrentDescriptor:\n"
|
||||||
"_DescriptorIndex() + 1) * sizeof(Descriptor) = %ld\n",
|
"\t_DescriptorIndex() + 1 * sizeof(Descriptor) = %ld\n"
|
||||||
"\t_DescriptorArraySize() = %ld\n\t_DescriptorArray() = %p\n",
|
"\t_DescriptorArraySize() = %ld\n"
|
||||||
(_DescriptorIndex() + 1) * sizeof(Descriptor), _DescriptorArraySize(),
|
"\t_DescriptorArray() = %p\n",
|
||||||
_DescriptorArray()));
|
(_DescriptorIndex() + 1) * sizeof(Descriptor),
|
||||||
|
_DescriptorArraySize(), _DescriptorArray()));
|
||||||
|
|
||||||
return ((_DescriptorIndex() + 1) * sizeof(Descriptor)
|
return ((_DescriptorIndex() + 1) * sizeof(Descriptor)
|
||||||
<= _DescriptorArraySize())
|
<= _DescriptorArraySize())
|
||||||
@ -196,6 +197,8 @@ template<class Accessor>
|
|||||||
void
|
void
|
||||||
AllocationDescriptorList<Accessor>::_WalkContinuationChain(Descriptor *descriptor)
|
AllocationDescriptorList<Accessor>::_WalkContinuationChain(Descriptor *descriptor)
|
||||||
{
|
{
|
||||||
|
TRACE(("AllocationDescriptorList<>::_WalkContinuationChain: descriptor = %p\n",
|
||||||
|
descriptor));
|
||||||
if (descriptor
|
if (descriptor
|
||||||
&& fAccessor.GetType(*descriptor) == EXTENT_TYPE_CONTINUATION) {
|
&& fAccessor.GetType(*descriptor) == EXTENT_TYPE_CONTINUATION) {
|
||||||
// Load the new block, make sure we're not trying
|
// Load the new block, make sure we're not trying
|
||||||
|
@ -15,15 +15,13 @@
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
DirectoryIterator::GetNextEntry(char *name, uint32 *length, ino_t *id)
|
DirectoryIterator::GetNextEntry(char *name, uint32 *length, ino_t *id)
|
||||||
{
|
{
|
||||||
TRACE(("DirectoryIterator::GetNextEntry: name = %s, length = %ld, id = %p\n",
|
|
||||||
name, *length, id));
|
|
||||||
|
|
||||||
if (!id || !name || !length)
|
if (!id || !name || !length)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
TRACE(("\tfPosition: %Ld\n", fPosition));
|
TRACE(("DirectoryIterator::GetNextEntry: name = %s, length = %ld, "
|
||||||
TRACE(("\tParent()->Length(): %Ld\n", Parent()->Length()));
|
"id = %p, position = %Ld, parent length = %Ld\n", name, *length, id,
|
||||||
|
fPosition, Parent()->Length()));
|
||||||
|
|
||||||
status_t status = B_OK;
|
status_t status = B_OK;
|
||||||
if (fAtBeginning) {
|
if (fAtBeginning) {
|
||||||
@ -57,12 +55,12 @@ DirectoryIterator::GetNextEntry(char *name, uint32 *length, ino_t *id)
|
|||||||
sprintf(name, "..");
|
sprintf(name, "..");
|
||||||
*length = 3;
|
*length = 3;
|
||||||
} else {
|
} else {
|
||||||
TRACE(("DirectoryIterator::GetNextEntry: UfdString\n"));
|
|
||||||
UdfString string(entry->id(), entry->id_length());
|
UdfString string(entry->id(), entry->id_length());
|
||||||
TRACE(("\tid == `%s'\n", string.Utf8()));
|
TRACE(("DirectoryIterator::GetNextEntry: UfdString id == `%s', "
|
||||||
|
"length = %d\n", string.Utf8(), string.Utf8Length()));
|
||||||
DUMP(entry->icb());
|
DUMP(entry->icb());
|
||||||
sprintf(name, "%s", string.Utf8());
|
sprintf(name, "%s", string.Utf8());
|
||||||
*length = string.Utf8Length() + 1;
|
*length = string.Utf8Length();
|
||||||
}
|
}
|
||||||
*id = to_vnode_id(entry->icb());
|
*id = to_vnode_id(entry->icb());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user