Fixed second stupid to_vnode_id() bug. This time, high-end 16 bits of address
block location were getting chopped off instead of being incorporated into vnode_id. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Udf {
|
|||||||
udf_long_address
|
udf_long_address
|
||||||
to_long_address(vnode_id id, uint32 length)
|
to_long_address(vnode_id id, uint32 length)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC(CF_PUBLIC | CF_HELPER, NULL, ("vnode_id: %Ld, length: %ld", id, length));
|
DEBUG_INIT_ETC(CF_PUBLIC | CF_HELPER, NULL, ("vnode_id: %Ld (0x%Lx), length: %ld", id, id, length));
|
||||||
udf_long_address result;
|
udf_long_address result;
|
||||||
result.set_block((id >> 16) & 0xffffffff);
|
result.set_block((id >> 16) & 0xffffffff);
|
||||||
result.set_partition(id & 0xffff);
|
result.set_partition(id & 0xffff);
|
||||||
@@ -38,7 +38,15 @@ to_long_address(vnode_id id, uint32 length)
|
|||||||
vnode_id
|
vnode_id
|
||||||
to_vnode_id(udf_long_address address)
|
to_vnode_id(udf_long_address address)
|
||||||
{
|
{
|
||||||
return (address.block() << 16) | (address.partition());
|
DEBUG_INIT(CF_PUBLIC | CF_HELPER, NULL);
|
||||||
|
vnode_id result = address.block();
|
||||||
|
result <<= 16;
|
||||||
|
result |= address.partition();
|
||||||
|
PRINT(("block: %ld, 0x%lx\n", address.block(), address.block()));
|
||||||
|
PRINT(("partition: %d, 0x%x\n", address.partition(), address.partition()));
|
||||||
|
PRINT(("length: %ld, 0x%lx\n", address.length(), address.length()));
|
||||||
|
PRINT(("vnode_id: %Ld, 0x%Lx\n", result, result));
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
|
|||||||
Reference in New Issue
Block a user