mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
Add emile_is_apple_driver to test if a partition is an apple_driver
This commit is contained in:
parent
b8d426d278
commit
bb5ad6ce4d
@ -15,6 +15,12 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
|||||||
#include "partition.h"
|
#include "partition.h"
|
||||||
#include "libemile.h"
|
#include "libemile.h"
|
||||||
|
|
||||||
|
int emile_is_apple_driver(emile_map_t *map)
|
||||||
|
{
|
||||||
|
return strncmp(map->partition.PartType,
|
||||||
|
APPLE_DRIVER, strlen(APPLE_DRIVER)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
int emile_map_has_apple_driver(emile_map_t *map)
|
int emile_map_has_apple_driver(emile_map_t *map)
|
||||||
{
|
{
|
||||||
int block, size, type, part;
|
int block, size, type, part;
|
||||||
@ -31,8 +37,7 @@ int emile_map_has_apple_driver(emile_map_t *map)
|
|||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (strncmp(map->partition.PartType,
|
if (emile_is_apple_driver(map))
|
||||||
APPLE_DRIVER, strlen(APPLE_DRIVER)) == 0)
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +119,7 @@ extern int emile_scsi_get_dev(int fd, int* driver, int *disk, int *partition);
|
|||||||
extern int emile_get_dev_name(char *s, int driver, int disk, int partition);
|
extern int emile_get_dev_name(char *s, int driver, int disk, int partition);
|
||||||
extern int emile_map_set_startup(char* dev_name, int partition);
|
extern int emile_map_set_startup(char* dev_name, int partition);
|
||||||
extern int emile_scsi_get_rdev(char* dev_name, int* driver, int *disk, int *partition);
|
extern int emile_scsi_get_rdev(char* dev_name, int* driver, int *disk, int *partition);
|
||||||
|
extern int emile_is_apple_driver(emile_map_t *map);
|
||||||
extern int emile_map_has_apple_driver(emile_map_t *map);
|
extern int emile_map_has_apple_driver(emile_map_t *map);
|
||||||
extern int emile_map_seek_driver_partition(emile_map_t *map, int start);
|
extern int emile_map_seek_driver_partition(emile_map_t *map, int start);
|
||||||
extern int emile_get_uncompressed_size(char *file);
|
extern int emile_get_uncompressed_size(char *file);
|
||||||
|
Loading…
Reference in New Issue
Block a user