mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-31 08:30:51 +00:00
Allow to not provide kernel or ramdisk
This commit is contained in:
parent
035322406a
commit
60ce7c18eb
@ -233,12 +233,20 @@ static int set_second(char *image, int second_offset, char *kernel_image, char *
|
|||||||
int ret;
|
int ret;
|
||||||
char k[512], r[512];
|
char k[512], r[512];
|
||||||
|
|
||||||
sprintf(k, "iso9660:(sd3)%s", kernel_image);
|
if (kernel_image)
|
||||||
sprintf(r, "iso9660:(sd3)%s", ramdisk);
|
{
|
||||||
|
sprintf(k, "iso9660:(sd3)%s", kernel_image);
|
||||||
|
kernel_image = k;
|
||||||
|
}
|
||||||
|
if (ramdisk)
|
||||||
|
{
|
||||||
|
sprintf(r, "iso9660:(sd3)%s", ramdisk);
|
||||||
|
ramdisk = r;
|
||||||
|
}
|
||||||
|
|
||||||
fd = open(image, O_RDWR);
|
fd = open(image, O_RDWR);
|
||||||
lseek(fd, second_offset * 512, SEEK_SET);
|
lseek(fd, second_offset * 512, SEEK_SET);
|
||||||
ret = emile_second_set_param(fd, k, cmdline, r);
|
ret = emile_second_set_param(fd, kernel_image, cmdline, ramdisk);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user