mirror of
https://github.com/vivier/EMILE.git
synced 2024-06-27 00:29:30 +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;
|
int fd;
|
||||||
unsigned short unit_id;
|
unsigned short unit_id;
|
||||||
struct emile_container *container;
|
struct emile_container *container;
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
fd = open(chainloader, O_RDONLY);
|
fd = open(chainloader, O_RDONLY);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
|
@ -502,6 +503,7 @@ static int8_t *set_config(emile_config *config, int drive)
|
||||||
chainloader);
|
chainloader);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
fstat(fd, &st);
|
||||||
|
|
||||||
container = malloc(
|
container = malloc(
|
||||||
sizeof(struct emile_container) +
|
sizeof(struct emile_container) +
|
||||||
|
@ -539,7 +541,7 @@ static int8_t *set_config(emile_config *config, int drive)
|
||||||
sprintf(chainloader,
|
sprintf(chainloader,
|
||||||
"block:(sd%d)0x%x,0x%x", unit_id,
|
"block:(sd%d)0x%x,0x%x", unit_id,
|
||||||
container->blocks[0].offset,
|
container->blocks[0].offset,
|
||||||
container->blocks[0].count);
|
st.st_size);
|
||||||
free(container);
|
free(container);
|
||||||
config_set_indexed_property(configuration,
|
config_set_indexed_property(configuration,
|
||||||
"title", title,
|
"title", title,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user