mirror of
https://github.com/vivier/EMILE.git
synced 2024-10-31 20:05:01 +00:00
Add map_get_blocksize()
This commit is contained in:
parent
79f9107e45
commit
eb9c17f5ad
@ -30,7 +30,7 @@ SOURCES = map_bootblock_get_type.c map_bootblock_is_valid.c \
|
||||
map_set_bootinfo.c map_set_driver_info.c map_set_driver_number.c \
|
||||
map_set_partition_name.c map_set_partition_type.c map_set_startup.c \
|
||||
map_write.c map_block0_write.c map_read_sector.c \
|
||||
map_write_sector.c
|
||||
map_write_sector.c map_get_blocksize.c
|
||||
|
||||
HEADERS = libmap.h
|
||||
|
||||
|
@ -121,11 +121,14 @@ struct Partition {
|
||||
#define APPLE_PATCHES "Apple_Patches"
|
||||
|
||||
#define MAP_NAME_LEN 256
|
||||
#define MAP_BLOCKSIZE 2048
|
||||
typedef struct {
|
||||
device_io_t *device;
|
||||
int current;
|
||||
struct DriverDescriptor drivers;
|
||||
char filler1[MAP_BLOCKSIZE-512];
|
||||
struct Partition partition;
|
||||
char filler2[MAP_BLOCKSIZE-512];
|
||||
} map_t;
|
||||
|
||||
enum {
|
||||
@ -178,4 +181,5 @@ extern unsigned long map_get_driver_signature(map_t* map);
|
||||
extern int map_block0_write(map_t *map);
|
||||
extern int map_read_sector(map_t* map, off_t block, char *buffer, size_t nb);
|
||||
extern int map_write_sector(map_t* map, off_t block, char *buffer, size_t nb);
|
||||
extern int map_get_blocksize(map_t *map);
|
||||
#endif
|
||||
|
12
libmap/map_get_blocksize.c
Normal file
12
libmap/map_get_blocksize.c
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (c) 2007 Laurent Vivier <Laurent@lvivier.info>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libmap.h"
|
||||
|
||||
int map_get_blocksize(map_t *map)
|
||||
{
|
||||
return map->device->get_blocksize(map->device->data);
|
||||
}
|
Loading…
Reference in New Issue
Block a user