Conversion functions actually work now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4158 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,17 +17,19 @@ namespace Udf {
|
||||
udf_long_address
|
||||
to_long_address(vnode_id id, uint32 length)
|
||||
{
|
||||
DEBUG_INIT_ETC(CF_PUBLIC | CF_HELPER, NULL, ("vnode_id: %lld, length: %ld", id, length));
|
||||
udf_long_address result;
|
||||
result.set_block(id & 0xffff00);
|
||||
result.set_partition(id & 0xff);
|
||||
result.set_block((id >> 16) & 0xffffffff);
|
||||
result.set_partition(id & 0xffff);
|
||||
result.set_length(length);
|
||||
DUMP(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
vnode_id
|
||||
to_vnode_id(udf_long_address address)
|
||||
{
|
||||
return (address.block() << 16) & (address.partition());
|
||||
return (address.block() << 16) | (address.partition());
|
||||
}
|
||||
|
||||
} // namespace Udf
|
||||
|
||||
Reference in New Issue
Block a user