New bootspec sparc_label=, new -as mkisofs options -sparc-boot , -sparc-label
This commit is contained in:
@ -262,14 +262,14 @@ int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text,
|
||||
int partno = 0, type_code= -1, i;
|
||||
unsigned int unum;
|
||||
char *tpt;
|
||||
static char *part_type_names[] = {"FAT12", "FAT16", "Linux", NULL};
|
||||
static int part_type_codes[] = { 0x01, 0x06, 0x83};
|
||||
static char *part_type_names[] = {"FAT12", "FAT16", "Linux", "", NULL};
|
||||
static int part_type_codes[] = { 0x01, 0x06, 0x83, 0x00};
|
||||
|
||||
sscanf(partno_text, "%d", &partno);
|
||||
if(partno < 1 || partno > 4) {
|
||||
if(partno < 1 || partno > Xorriso_max_appended_partitionS) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-append_partition: Partition number '%s' is out of range (1...4)",
|
||||
partno_text);
|
||||
"-append_partition: Partition number '%s' is out of range (1...%d)",
|
||||
partno_text, Xorriso_max_appended_partitionS);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
@ -297,8 +297,13 @@ bad_type:;
|
||||
type_code= unum;
|
||||
}
|
||||
|
||||
if(Sfile_str(xorriso->appended_partitions[partno - 1], image_path, 0) <= 0)
|
||||
if(xorriso->appended_partitions[partno - 1] != NULL)
|
||||
free(xorriso->appended_partitions[partno - 1]);
|
||||
xorriso->appended_partitions[partno - 1]= strdup(image_path);
|
||||
if(xorriso->appended_partitions[partno - 1] == NULL) {
|
||||
Xorriso_no_malloc_memory(xorriso, NULL, 0);
|
||||
return(-1);
|
||||
}
|
||||
xorriso->appended_part_types[partno - 1]= type_code;
|
||||
return(1);
|
||||
}
|
||||
@ -808,10 +813,20 @@ treatment_patch:;
|
||||
return(ret);
|
||||
|
||||
} else if(strcmp(treatpt, "mips_discard") == 0 ||
|
||||
strcmp(treatpt, "mipsel_discard") == 0) {
|
||||
strcmp(treatpt, "mipsel_discard") == 0 ||
|
||||
strcmp(treatpt, "sparc_discard") == 0) {
|
||||
xorriso->system_area_options&= ~0xfc; /* system area type 0 */
|
||||
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
|
||||
|
||||
} else if(strncmp(treatpt, "sparc_label=", 12) == 0) {
|
||||
sprintf(eff_path, "-boot_image %s sparc_path=", formpt);
|
||||
ret= Xorriso_coordinate_system_area(xorriso, 3, 0, eff_path, 0);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
strncpy(xorriso->ascii_disc_label, treatpt + 12,
|
||||
Xorriso_disc_label_sizE - 1);
|
||||
xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0;
|
||||
|
||||
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
|
||||
if(strcmp(treatpt + 16, "off") == 0)
|
||||
xorriso->patch_isolinux_image= 0;
|
||||
|
Reference in New Issue
Block a user