mirror of
https://github.com/vivier/EMILE.git
synced 2024-09-08 19:54:38 +00:00
call map_partition_read()
This commit is contained in:
parent
e07088c23c
commit
499cf44318
@ -14,16 +14,5 @@
|
|||||||
|
|
||||||
int map_bootblock_read(map_t* map, char* bootblock)
|
int map_bootblock_read(map_t* map, char* bootblock)
|
||||||
{
|
{
|
||||||
off_t offset;
|
return map_partition_read(map, 0, BOOTBLOCK_SIZE / FLOPPY_SECTOR_SIZE, bootblock);
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!map_partition_is_valid(map))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
offset = read_long((u_int32_t*)&map->partition.PyPartStart) * 512;
|
|
||||||
|
|
||||||
ret = map->device->read_sector(map->device,
|
|
||||||
offset, bootblock, BOOTBLOCK_SIZE);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user