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:
@@ -23,7 +23,6 @@ const char *kModuleDebugName = "fs/bfs";
|
|||||||
//#define TRACE(x) dprintf x
|
//#define TRACE(x) dprintf x
|
||||||
|
|
||||||
// prototypes
|
// prototypes
|
||||||
//static status_t read_block(int fd, off_t offset, size_t size, uchar **block);
|
|
||||||
static bool bfs_fs_identify(int deviceFD,
|
static bool bfs_fs_identify(int deviceFD,
|
||||||
struct extended_partition_info *partitionInfo, float *priority,
|
struct extended_partition_info *partitionInfo, float *priority,
|
||||||
fs_get_buffer get_buffer, struct fs_buffer_cache *cache);
|
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) {
|
if (partitionInfo) {
|
||||||
uchar *buffer = NULL;
|
uchar *buffer = NULL;
|
||||||
disk_super_block *superBlock = NULL;
|
disk_super_block *superBlock = NULL;
|
||||||
status_t error = read_block(get_buffer, cache,
|
status_t error = read_block(get_buffer, cache, 0, 1024, &buffer);
|
||||||
partitionInfo->info.offset, 1024, &buffer);
|
|
||||||
if (!error && buffer) {
|
if (!error && buffer) {
|
||||||
superBlock = (disk_super_block*)(buffer+512);
|
superBlock = (disk_super_block*)(buffer+512);
|
||||||
// dump_super_block(superBlock);
|
// dump_super_block(superBlock);
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ iso9660_fs_identify(int deviceFD, struct extended_partition_info *partitionInfo,
|
|||||||
bool exit = false;
|
bool exit = false;
|
||||||
// The first 16 blocks are for "system use" only, and thus are
|
// The first 16 blocks are for "system use" only, and thus are
|
||||||
// irrelevant to us and generally just zeros
|
// 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;
|
status_t error = B_OK;
|
||||||
|
|
||||||
TRACE(("%s: identify(%d, %p)\n", kModuleDebugName, deviceFD,
|
TRACE(("%s: identify(%d, %p)\n", kModuleDebugName, deviceFD,
|
||||||
|
|||||||
Reference in New Issue
Block a user