get_buffer() has been changed to use partition-relative offsets.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2514 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-01-19 23:03:44 +00:00
parent 54641967ec
commit 97f9cd98b8
2 changed files with 2 additions and 4 deletions

View File

@ -23,7 +23,6 @@ const char *kModuleDebugName = "fs/bfs";
//#define TRACE(x) dprintf x
// prototypes
//static status_t read_block(int fd, off_t offset, size_t size, uchar **block);
static bool bfs_fs_identify(int deviceFD,
struct extended_partition_info *partitionInfo, float *priority,
fs_get_buffer get_buffer, struct fs_buffer_cache *cache);
@ -181,8 +180,7 @@ bfs_fs_identify(int deviceFD, struct extended_partition_info *partitionInfo,
if (partitionInfo) {
uchar *buffer = NULL;
disk_super_block *superBlock = NULL;
status_t error = read_block(get_buffer, cache,
partitionInfo->info.offset, 1024, &buffer);
status_t error = read_block(get_buffer, cache, 0, 1024, &buffer);
if (!error && buffer) {
superBlock = (disk_super_block*)(buffer+512);
// dump_super_block(superBlock);

View File

@ -162,7 +162,7 @@ iso9660_fs_identify(int deviceFD, struct extended_partition_info *partitionInfo,
bool exit = false;
// The first 16 blocks are for "system use" only, and thus are
// irrelevant to us and generally just zeros
off_t offset = partitionInfo->info.offset + 16*blockSize;
off_t offset = 16 * blockSize;
status_t error = B_OK;
TRACE(("%s: identify(%d, %p)\n", kModuleDebugName, deviceFD,