Small adjustments and bug fix with new MIPS boot facility.
This commit is contained in:
parent
f33df0ef29
commit
870280a018
@ -636,7 +636,7 @@ int iso_image_get_mips_boot_files(IsoImage *image, char *paths[15], int flag)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < image->num_mips_boot_files; i++)
|
||||
paths[i] = image->mips_boot_file_paths[image->num_mips_boot_files];
|
||||
paths[i] = image->mips_boot_file_paths[i];
|
||||
for (; i < 15; i++)
|
||||
paths[i] = NULL;
|
||||
return image->num_mips_boot_files;
|
||||
|
@ -2968,13 +2968,15 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
|
||||
int *options, int flag);
|
||||
|
||||
/**
|
||||
* Add a MIPS Big Endian boot file to the image. Up to 15 such files can be
|
||||
* written into a MIPS Big Endian Volume Header if this is enabled by
|
||||
* Add a MIPS Big Endian boot file path to the image. Up to 15 such files can
|
||||
* be written into a MIPS Big Endian Volume Header if this is enabled by
|
||||
* value 1 in iso_write_opts_set_system_area() option bits 2 to 7.
|
||||
* The data files which shall serve as MIPS boot files have to be brought into
|
||||
* the image by the normal means.
|
||||
* @param img
|
||||
* The image to be manipulated.
|
||||
* @param path
|
||||
* Absolute path of the boot file in the ISO 9660 Rock Ridge tree
|
||||
* Absolute path of the boot file in the ISO 9660 Rock Ridge tree.
|
||||
* @param flag
|
||||
* Bitfield for control purposes, unused yet, submit 0
|
||||
* @return
|
||||
|
@ -236,7 +236,8 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
|
||||
int ret;
|
||||
#endif
|
||||
|
||||
memset(buf, 0, 16 * BLOCK_SIZE);
|
||||
/* Bytes 512 to 32767 may come from image or external file */
|
||||
memset(buf, 0, 512);
|
||||
|
||||
image_size = t->curblock * 2048;
|
||||
|
||||
@ -425,14 +426,14 @@ int iso_write_system_area(Ecma119Image *t, uint8_t *buf)
|
||||
ret = make_mips_volume_header(t, buf, 0);
|
||||
if (ret != ISO_SUCCESS)
|
||||
return ret;
|
||||
} else if(t->partition_offset > 0) {
|
||||
} else if(t->partition_offset > 0 && sa_type == 0) {
|
||||
/* Write a simple partition table. */
|
||||
ret = make_grub_msdos_label(img_blocks, buf, 2);
|
||||
if (ret != ISO_SUCCESS) /* error should never happen */
|
||||
return ISO_ASSERT_FAILURE;
|
||||
}
|
||||
|
||||
if (t->partition_offset > 0) {
|
||||
if (t->partition_offset > 0 && sa_type == 0) {
|
||||
/* Adjust partition table to partition offset */
|
||||
img_blocks = t->curblock; /* value might be altered */
|
||||
ret = iso_offset_partition_start(img_blocks, t->partition_offset,
|
||||
|
Loading…
Reference in New Issue
Block a user