mirror of
https://github.com/vivier/EMILE.git
synced 2024-09-08 19:54:38 +00:00
Fixe temporarily size of Apple_Driver partition
This commit is contained in:
parent
13c80d5e27
commit
c3e57818e4
@ -131,7 +131,7 @@ static int get_driver(emile_map_t *map, int partition, char* appledriver)
|
||||
return -1;
|
||||
}
|
||||
|
||||
code = (char*)malloc(bootsize);
|
||||
code = (char*)malloc(128 * 512);
|
||||
if (code == NULL)
|
||||
{
|
||||
fprintf(stderr, "ERROR: cannot malloc() to load driver in memory\n");
|
||||
@ -153,10 +153,10 @@ static int get_driver(emile_map_t *map, int partition, char* appledriver)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = read(fd, code, bootsize);
|
||||
ret = read(fd, code, 128 * 512);
|
||||
close(fd);
|
||||
|
||||
if (ret != bootsize)
|
||||
if (ret != 128 * 512)
|
||||
{
|
||||
fprintf(stderr, "ERROR: cannot read driver (read())\n");
|
||||
free(code);
|
||||
@ -179,11 +179,11 @@ static int get_driver(emile_map_t *map, int partition, char* appledriver)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = write(fd, code, bootsize);
|
||||
ret = write(fd, code, 128 * 512);
|
||||
close(fd);
|
||||
free(code);
|
||||
|
||||
if (ret != bootsize)
|
||||
if (ret != 128 * 512)
|
||||
{
|
||||
fprintf(stderr, "ERROR: cannot save driver to %s\n",
|
||||
appledriver);
|
||||
|
Loading…
Reference in New Issue
Block a user