New bootspec partition_cyl_align=, new -as mkisofs option -partition_cyl_align
This commit is contained in:
parent
d660e9303c
commit
07f40dce4c
@ -565,7 +565,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
"-checksum_algorithm_iso", "-checksum_algorithm_template",
|
||||
"--stdio_sync", "--quoted_path_list", "--efi-boot", "--embedded-boot",
|
||||
"-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl",
|
||||
"-partition_sec_hd", "-untranslated_name_len",
|
||||
"-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len",
|
||||
""
|
||||
};
|
||||
static char arg2_options[][41]= {
|
||||
@ -761,6 +761,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
||||
" -partition_offset LBA Make image mountable by first partition, too",
|
||||
" -partition_sec_hd NUMBER Define number of sectors per head",
|
||||
" -partition_hd_cyl NUMBER Define number of heads per cylinder",
|
||||
" -partition_cyl_align MODE Control cylinder alignment: off, on, auto",
|
||||
" -mips-boot FILE Set mips boot image name (relative to image root)",
|
||||
" -mipsel-boot FILE Set mipsel boot image name (relative to image root)",
|
||||
" -B FILES, -sparc-boot FILES Set sparc boot image names",
|
||||
@ -1359,6 +1360,7 @@ not_enough_args:;
|
||||
strcmp(argv[i], "-partition_offset") == 0 ||
|
||||
strcmp(argv[i], "-partition_hd_cyl") == 0 ||
|
||||
strcmp(argv[i], "-partition_sec_hd") == 0 ||
|
||||
strcmp(argv[i], "-partition_cyl_align") == 0 ||
|
||||
strcmp(argv[i], "-isohybrid-mbr")==0) {
|
||||
if(i+1>=argc)
|
||||
goto not_enough_args;
|
||||
@ -1798,7 +1800,8 @@ problem_handler_2:;
|
||||
xorriso->boot_image_cat_hidden|= 3;
|
||||
} else if(strcmp(argv[i], "-partition_offset") == 0 ||
|
||||
strcmp(argv[i], "-partition_sec_hd") == 0 ||
|
||||
strcmp(argv[i], "-partition_hd_cyl") == 0) {
|
||||
strcmp(argv[i], "-partition_hd_cyl") == 0 ||
|
||||
strcmp(argv[i], "-partition_cyl_align") == 0) {
|
||||
if(i+1>=argc)
|
||||
goto not_enough_args;
|
||||
i++;
|
||||
|
@ -932,6 +932,23 @@ treatment_patch:;
|
||||
}
|
||||
xorriso->partition_secs_per_head= u;
|
||||
|
||||
} else if(strncmp(treatpt, "partition_cyl_align=", 20)==0) {
|
||||
if(strcmp(treatpt + 20, "auto") == 0)
|
||||
xorriso->system_area_options= (xorriso->system_area_options & ~0x300);
|
||||
else if(strcmp(treatpt + 20, "on") == 0)
|
||||
xorriso->system_area_options=
|
||||
(xorriso->system_area_options & ~0x300) | 0x100;
|
||||
else if(strcmp(treatpt + 20, "off") == 0)
|
||||
xorriso->system_area_options=
|
||||
(xorriso->system_area_options & ~0x300) | 0x200;
|
||||
else {
|
||||
sprintf(xorriso->info_text,
|
||||
"-boot_image %s partition_cyl_align: unknown mode : %s",
|
||||
formpt, treatpt + 20);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
} else if(strncmp(treatpt, "platform_id=", 12)==0) {
|
||||
if(strncmp(treatpt + 12, "0x", 2) == 0)
|
||||
sscanf(treatpt + 14, "%x", &u);
|
||||
|
@ -1295,6 +1295,13 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
ret= (xorriso->system_area_options & 0x300) >> 8;
|
||||
is_default= (ret == 0);
|
||||
sprintf(line,"-boot_image any partition_cyl_align=%s\n",
|
||||
ret == 0 ? "auto" : ret == 1 ? "on" : "off");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
if((xorriso->system_area_disk_path[0] || !part_table_implicit) &&
|
||||
(xorriso->partition_offset == 0 || (xorriso->system_area_options & 2))) {
|
||||
is_default= ((xorriso->system_area_options & 3) == 0);
|
||||
|
@ -341,6 +341,12 @@ struct XorrisO { /* the global context of xorriso */
|
||||
else: unspecified type
|
||||
1= MIPS Big Endian Volume Header
|
||||
2= MIPS Little Endian Boot Block
|
||||
3= SUN Disk Label for SUN SPARC
|
||||
bit8-9= Only with System area type 0
|
||||
Cylinder alignment mode
|
||||
0 = auto (align if bit1)
|
||||
1 = always align
|
||||
2 = never align
|
||||
*/
|
||||
int patch_system_area; /* Bits as of system_area_options.
|
||||
to be applied to the loaded system
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2011.03.03.181601"
|
||||
#define Xorriso_timestamP "2011.03.03.181850"
|
||||
|
Loading…
Reference in New Issue
Block a user