mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
use new function emile_second_set_buffer_size
This commit is contained in:
parent
a68bdea45c
commit
54b000c149
@ -187,7 +187,8 @@ int emile_floppy_create_image(char* first_level, char* second_level,
|
||||
ret = emile_second_set_kernel(fd, kernel_image,
|
||||
FIRST_LEVEL_SIZE +
|
||||
emile_file_get_size(second_level),
|
||||
buffer_size, ramdisk);
|
||||
ramdisk);
|
||||
ret = emile_second_set_buffer_size(fd, buffer_size);
|
||||
|
||||
close(fd);
|
||||
|
||||
|
@ -14,7 +14,7 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
||||
|
||||
int emile_second_get_kernel(int fd, u_int32_t *kernel_offset,
|
||||
u_int32_t *kernel_image_size,
|
||||
u_int32_t *kernel_size, u_int32_t *ramdisk_offset,
|
||||
u_int32_t *ramdisk_offset,
|
||||
u_int32_t *ramdisk_size)
|
||||
{
|
||||
emile_l2_header_t header;
|
||||
@ -26,7 +26,6 @@ int emile_second_get_kernel(int fd, u_int32_t *kernel_offset,
|
||||
|
||||
*kernel_offset = read_long(&header.kernel_image_offset);
|
||||
*kernel_image_size = read_long(&header.kernel_image_size);
|
||||
*kernel_size = read_long(&header.kernel_size);
|
||||
*ramdisk_offset = read_long(&header.ramdisk_offset);
|
||||
*ramdisk_size = read_long(&header.ramdisk_size);
|
||||
|
||||
|
@ -14,8 +14,7 @@ static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
||||
#include "bootblock.h"
|
||||
|
||||
int emile_second_set_kernel(int fd, char *kernel_image,
|
||||
u_int32_t kernel_offset,
|
||||
u_int32_t buffer_size, char* ramdisk)
|
||||
u_int32_t kernel_offset, char* ramdisk)
|
||||
{
|
||||
emile_l2_header_t header;
|
||||
int ret;
|
||||
@ -36,8 +35,6 @@ int emile_second_set_kernel(int fd, char *kernel_image,
|
||||
emile_file_get_size(kernel_image));
|
||||
}
|
||||
|
||||
write_long(&header.kernel_size, buffer_size);
|
||||
|
||||
if (ramdisk == NULL)
|
||||
{
|
||||
write_long(&header.ramdisk_offset, 0);
|
||||
|
@ -34,7 +34,7 @@ int main(int argc, char **argv)
|
||||
/* set buffer size */
|
||||
|
||||
printf("Setting buffer size to %d\n", atoi(argv[4]));
|
||||
ret = emile_second_set_kernel(fd, NULL, 0, atoi(argv[4]), NULL);
|
||||
ret = emile_second_set_buffer_size(fd, atoi(argv[4]));
|
||||
|
||||
/* set cmdline */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user