New -boot_image setting hppa_hdrversion=

This commit is contained in:
2014-01-16 11:34:11 +00:00
parent 98de4cc328
commit 30ab79d39a
7 changed files with 98 additions and 53 deletions

View File

@ -539,7 +539,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
char *filter, FILE *fp, int flag)
{
int i, num_boots, sa_type, ret;
char *paths[15], *line;
char *paths[15], *line, num[4];
char *cmdline, *bootloader, *kernel_32, *kernel_64, *ramdisk;
line= xorriso->result_line;
@ -556,7 +556,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
Xorriso_status_result(xorriso, filter, fp, flag & 2);
return(0);
}
if(sa_type != 1 && sa_type != 2 && sa_type != 4)
if(sa_type != 1 && sa_type != 2 && sa_type != 4 && sa_type != 5)
return(0);
if(sa_type == 1 || sa_type == 2) {
@ -574,7 +574,7 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
}
return(num_boots);
}
if(sa_type == 4) {
if(sa_type == 4 || sa_type == 5) {
ret= iso_image_get_hppa_palo(image, &cmdline, &bootloader, &kernel_32,
&kernel_64, &ramdisk);
if(ret == 1) {
@ -583,6 +583,8 @@ int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
Xorriso_status_hppa(xorriso, "kernel_32", kernel_32, filter, fp, 0);
Xorriso_status_hppa(xorriso, "kernel_64", kernel_64, filter, fp, 0);
Xorriso_status_hppa(xorriso, "ramdisk", ramdisk, filter, fp, 0);
sprintf(num, "%d", sa_type);
Xorriso_status_hppa(xorriso, "hdrversion", num, filter, fp, 0);
}
return(0);
}
@ -1288,6 +1290,20 @@ int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
par[3]= text;
} else if(strcmp(what, "ramdisk") == 0) {
par[4]= text;
} else if(strcmp(what, "hdrversion") == 0) {
if(strcmp(text, "4") == 0) {
xorriso->system_area_options= (xorriso->system_area_options & ~0xfc) |
(4 << 2);
} else if(strcmp(text, "5") == 0) {
xorriso->system_area_options= (xorriso->system_area_options & ~0xfc) |
(5 << 2);
} else {
strcpy(xorriso->info_text, "Unsupported HP-PA PALO header version ");
Text_shellsafe(text, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
return(1);
} else {
strcpy(xorriso->info_text,
"HP-PA boot parameter name not recognized: hppa_");