mirror of
https://github.com/vivier/EMILE.git
synced 2024-05-31 17:41:33 +00:00
for chainloader, size of "block:" is in bytes
This commit is contained in:
parent
7e4c1ca39c
commit
0ec74c655d
|
@ -493,6 +493,7 @@ static int8_t *set_config(emile_config *config, int drive)
|
|||
int fd;
|
||||
unsigned short unit_id;
|
||||
struct emile_container *container;
|
||||
struct stat st;
|
||||
|
||||
fd = open(chainloader, O_RDONLY);
|
||||
if (fd == -1)
|
||||
|
@ -502,6 +503,7 @@ static int8_t *set_config(emile_config *config, int drive)
|
|||
chainloader);
|
||||
return NULL;
|
||||
}
|
||||
fstat(fd, &st);
|
||||
|
||||
container = malloc(
|
||||
sizeof(struct emile_container) +
|
||||
|
@ -539,7 +541,7 @@ static int8_t *set_config(emile_config *config, int drive)
|
|||
sprintf(chainloader,
|
||||
"block:(sd%d)0x%x,0x%x", unit_id,
|
||||
container->blocks[0].offset,
|
||||
container->blocks[0].count);
|
||||
st.st_size);
|
||||
free(container);
|
||||
config_set_indexed_property(configuration,
|
||||
"title", title,
|
||||
|
|
Loading…
Reference in New Issue
Block a user