New -boot_image bootspecs hfsplus_block_size= and apm_block_size=

This commit is contained in:
Thomas Schmitt 2012-06-27 18:48:16 +00:00
parent 50e8b66845
commit 62d27011f0
10 changed files with 126 additions and 41 deletions

View File

@ -264,6 +264,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
} }
m->ascii_disc_label[0]= 0; m->ascii_disc_label[0]= 0;
memset(m->hfsp_serial_number, 0, 8); memset(m->hfsp_serial_number, 0, 8);
m->hfsp_block_size= 0;
m->apm_block_size= 0;
m->vol_creation_time= 0; m->vol_creation_time= 0;
m->vol_modification_time= 0; m->vol_modification_time= 0;
m->vol_expiration_time= 0; m->vol_expiration_time= 0;

View File

@ -1013,6 +1013,34 @@ treatment_patch:;
memcpy(xorriso->hfsp_serial_number, sn, 8); memcpy(xorriso->hfsp_serial_number, sn, 8);
} }
} else if(strncmp(treatpt, "hfsplus_block_size=", 19) == 0) {
u= 0;
sscanf(treatpt + 19, "%u", &u);
if(u != 0 && u!= 512 && u != 2048) {
sprintf(xorriso->info_text,
"boot_image %s : Malformed hfsplus_block_size : %s",
formpt, treatpt + 19);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
Xorriso_msgs_submit(xorriso, 0, "Expected are 0, 512, or 2048",
0, "HINT", 0);
ret= 0; goto ex;
}
xorriso->hfsp_block_size= u;
} else if(strncmp(treatpt, "apm_block_size=", 15) == 0) {
u= 0;
sscanf(treatpt + 15, "%u", &u);
if(u != 0 && u!= 512 && u != 2048) {
sprintf(xorriso->info_text,
"boot_image %s : Malformed apm_block_size : %s",
formpt, treatpt + 15);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
Xorriso_msgs_submit(xorriso, 0, "Expected are 0, 512, or 2048",
0, "HINT", 0);
ret= 0; goto ex;
}
xorriso->apm_block_size= u;
} else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) { } else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) {
if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0) if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0)
{ret= -1; goto ex;} {ret= -1; goto ex;}

View File

@ -1629,7 +1629,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"", " |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"", " |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
" |\"sparc_label=\"|\"sparc_discard\"", " |\"sparc_label=\"|\"sparc_discard\"",
" |\"hfsplus_serial=\"|\"show_status\"", " |\"hfsplus_serial=\"|\"hfsplus_block_size=\"",
" |\"apm_block_size=\"|\"show_status\"",
" Whether to discard or keep an exiting El Torito boot image.", " Whether to discard or keep an exiting El Torito boot image.",
" ISOLINUX can be made bootable by dir=/ or dir=/isolinux", " ISOLINUX can be made bootable by dir=/ or dir=/isolinux",
" or dir=/boot/isolinux. Others, like GRUB, by bin_path=...", " or dir=/boot/isolinux. Others, like GRUB, by bin_path=...",

View File

@ -1431,6 +1431,18 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2); Xorriso_status_result(xorriso, filter, fp, flag & 2);
is_default= (xorriso->hfsp_block_size == 0);
sprintf(line, "-boot_image any hfsplus_block_size=%d\n",
xorriso->hfsp_block_size);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
is_default= (xorriso->apm_block_size == 0);
sprintf(line, "-boot_image any apm_block_size=%d\n",
xorriso->apm_block_size);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
sprintf(line,"-cd %s\n", sprintf(line,"-cd %s\n",
(xorriso->wdi[0] ? Text_shellsafe(xorriso->wdi,sfe,0) : "'/'")); (xorriso->wdi[0] ? Text_shellsafe(xorriso->wdi,sfe,0) : "'/'"));
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);

View File

@ -886,6 +886,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
} }
isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label); isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label);
isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number); isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number);
isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size,
xorriso->apm_block_size);
if(image!=NULL && 12+strlen(Xorriso_timestamP)<80) { if(image!=NULL && 12+strlen(Xorriso_timestamP)<80) {
strcpy(xorriso_id, xorriso->preparer_id); strcpy(xorriso_id, xorriso->preparer_id);

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.2.3, Jun 21, 2012" .TH XORRISO 1 "Version 1.2.3, Jun 27, 2012"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -2930,6 +2930,17 @@ This removes the ban on production of other boot blocks.
and letters "a" to "f", which will be used as unique serial number of and letters "a" to "f", which will be used as unique serial number of
an emerging HFS+ filesystem. an emerging HFS+ filesystem.
.br .br
\fBhfsplus_block_size=\fRnumber sets the allocation block size to
be used when producing HFS+ filesystems. Permissible are 512, 2048, or 0.
The latter lets the program decide.
.br
\fBapm_block_size=\fRnumber sets the block size to be used when
describing partitions by an Apple Partition Map. Permissible are 512, 2048,
or 0. The latter lets the program decide.
.br
Note that size 512 is not compatible with production of GPT, and that
size 2048 will not be mountable \-t hfsplus at least by older Linux kernels.
.br
.TP .TP
\fB\-append_partition\fR partition_number type_code disk_path \fB\-append_partition\fR partition_number type_code disk_path
Cause a prepared filesystem image to be appended to the ISO image and to be Cause a prepared filesystem image to be appended to the ISO image and to be

View File

@ -2587,6 +2587,15 @@ filesystem and announced by an MBR partition table entry.
*hfsplus_serial=*hexstring sets a string of 16 digits "0" to "9" *hfsplus_serial=*hexstring sets a string of 16 digits "0" to "9"
and letters "a" to "f", which will be used as unique serial number and letters "a" to "f", which will be used as unique serial number
of an emerging HFS+ filesystem. of an emerging HFS+ filesystem.
*hfsplus_block_size=*number sets the allocation block size to be
used when producing HFS+ filesystems. Permissible are 512, 2048,
or 0. The latter lets the program decide.
*apm_block_size=*number sets the block size to be used when
describing partitions by an Apple Partition Map. Permissible are
512, 2048, or 0. The latter lets the program decide.
Note that size 512 is not compatible with production of GPT, and
that size 2048 will not be mountable -t hfsplus at least by older
Linux kernels.
-append_partition partition_number type_code disk_path -append_partition partition_number type_code disk_path
@ -4498,7 +4507,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -alter_date sets timestamps in ISO image: Manip. (line 147) * -alter_date sets timestamps in ISO image: Manip. (line 147)
* -alter_date_r sets timestamps in ISO image: Manip. (line 167) * -alter_date_r sets timestamps in ISO image: Manip. (line 167)
* -append_partition adds arbitrary file after image end: Bootable. * -append_partition adds arbitrary file after image end: Bootable.
(line 223) (line 232)
* -application_id sets application id: SetWrite. (line 184) * -application_id sets application id: SetWrite. (line 184)
* -as emulates mkisofs or cdrecord: Emulation. (line 13) * -as emulates mkisofs or cdrecord: Emulation. (line 13)
* -assert_volid rejects undesired images: Loading. (line 84) * -assert_volid rejects undesired images: Loading. (line 84)
@ -4721,9 +4730,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ACL, set in ISO image, -setfacl_r: Manip. (line 98) * ACL, set in ISO image, -setfacl_r: Manip. (line 98)
* ACL, show in ISO image, -getfacl: Navigate. (line 70) * ACL, show in ISO image, -getfacl: Navigate. (line 70)
* ACL, show in ISO image, -getfacl_r: Navigate. (line 77) * ACL, show in ISO image, -getfacl_r: Navigate. (line 77)
* APM block size: Bootable. (line 223)
* APM, _definition: Extras. (line 41) * APM, _definition: Extras. (line 41)
* Appendable media, _definition: Media. (line 38) * Appendable media, _definition: Media. (line 38)
* Appended Filesystem Image, -append_partition: Bootable. (line 223) * Appended Filesystem Image, -append_partition: Bootable. (line 232)
* Automatic execution order, of arguments, -x: ArgSort. (line 16) * Automatic execution order, of arguments, -x: ArgSort. (line 16)
* Backslash Interpretation, _definition: Processing. (line 52) * Backslash Interpretation, _definition: Processing. (line 52)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 190) * Backup, enable fast incremental, -disk_dev_ino: Loading. (line 190)
@ -4801,6 +4811,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Group, in ISO image, -chgrp_r: Manip. (line 55) * Group, in ISO image, -chgrp_r: Manip. (line 55)
* Growing, _definition: Methods. (line 19) * Growing, _definition: Methods. (line 19)
* Hard links, control handling, -hardlinks: Loading. (line 110) * Hard links, control handling, -hardlinks: Loading. (line 110)
* HFS+ allocation block size: Bootable. (line 220)
* HFS+ serial number: Bootable. (line 217) * HFS+ serial number: Bootable. (line 217)
* hidden, set in ISO image, -hide: Manip. (line 171) * hidden, set in ISO image, -hide: Manip. (line 171)
* Image reading, cache size, -data_cache_size: Loading. (line 265) * Image reading, cache size, -data_cache_size: Loading. (line 265)
@ -4942,7 +4953,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Session, select as input, -load: Loading. (line 11) * Session, select as input, -load: Loading. (line 11)
* Sorting order, for -x, -list_arg_sorting: ArgSort. (line 27) * Sorting order, for -x, -list_arg_sorting: ArgSort. (line 27)
* SUN Disk Label, production: Bootable. (line 208) * SUN Disk Label, production: Bootable. (line 208)
* SUN SPARC boot images, activation: Bootable. (line 244) * SUN SPARC boot images, activation: Bootable. (line 253)
* System area, _definition: Bootable. (line 121) * System area, _definition: Bootable. (line 121)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 211) * Table-of-content, search sessions, -rom_toc_scan: Loading. (line 211)
* Table-of-content, show, -toc: Inquiry. (line 28) * Table-of-content, show, -toc: Inquiry. (line 28)
@ -5007,39 +5018,39 @@ Node: Filter87916
Node: Writing92471 Node: Writing92471
Node: SetWrite101435 Node: SetWrite101435
Node: Bootable119268 Node: Bootable119268
Node: Jigdo133969 Node: Jigdo134511
Node: Charset138215 Node: Charset138757
Node: Exception140976 Node: Exception141518
Node: DialogCtl147095 Node: DialogCtl147637
Node: Inquiry149692 Node: Inquiry150234
Node: Navigate154558 Node: Navigate155100
Node: Verify162855 Node: Verify163397
Node: Restore171821 Node: Restore172363
Node: Emulation178730 Node: Emulation179272
Node: Scripting188541 Node: Scripting189083
Node: Frontend195701 Node: Frontend196243
Node: Examples197001 Node: Examples197543
Node: ExDevices198178 Node: ExDevices198720
Node: ExCreate198837 Node: ExCreate199379
Node: ExDialog200122 Node: ExDialog200664
Node: ExGrowing201387 Node: ExGrowing201929
Node: ExModifying202192 Node: ExModifying202734
Node: ExBootable202696 Node: ExBootable203238
Node: ExCharset203248 Node: ExCharset203790
Node: ExPseudo204069 Node: ExPseudo204611
Node: ExCdrecord204967 Node: ExCdrecord205509
Node: ExMkisofs205284 Node: ExMkisofs205826
Node: ExGrowisofs206624 Node: ExGrowisofs207166
Node: ExException207759 Node: ExException208301
Node: ExTime208213 Node: ExTime208755
Node: ExIncBackup208672 Node: ExIncBackup209214
Node: ExRestore212663 Node: ExRestore213205
Node: ExRecovery213623 Node: ExRecovery214165
Node: Files214193 Node: Files214735
Node: Seealso215492 Node: Seealso216034
Node: Bugreport216215 Node: Bugreport216757
Node: Legal216796 Node: Legal217338
Node: CommandIdx217807 Node: CommandIdx218349
Node: ConceptIdx233606 Node: ConceptIdx234148
 
End Tag Table End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1) @c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.2.3, Jun 21, 2012" @c man .TH XORRISO 1 "Version 1.2.3, Jun 27, 2012"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -3449,6 +3449,19 @@ This removes the ban on production of other boot blocks.
@strong{hfsplus_serial=}hexstring sets a string of 16 digits "0" to "9" @strong{hfsplus_serial=}hexstring sets a string of 16 digits "0" to "9"
and letters "a" to "f", which will be used as unique serial number of and letters "a" to "f", which will be used as unique serial number of
an emerging HFS+ filesystem. an emerging HFS+ filesystem.
@*
@cindex HFS+ allocation block size
@strong{hfsplus_block_size=}number sets the allocation block size to
be used when producing HFS+ filesystems. Permissible are 512, 2048, or 0.
The latter lets the program decide.
@*
@cindex APM block size
@strong{apm_block_size=}number sets the block size to be used when
describing partitions by an Apple Partition Map. Permissible are 512, 2048,
or 0. The latter lets the program decide.
@*
Note that size 512 is not compatible with production of GPT, and that
size 2048 will not be mountable -t hfsplus at least by older Linux kernels.
@end table @end table
@* @*
@table @asis @table @asis

View File

@ -424,6 +424,11 @@ struct XorrisO { /* the global context of xorriso */
*/ */
uint8_t hfsp_serial_number[8]; uint8_t hfsp_serial_number[8];
/* Allocation block size of HFS+ and APM : 0= auto , 512, or 2048
*/
int hfsp_block_size;
int apm_block_size;
/* User settable PVD time stamps */ /* User settable PVD time stamps */
time_t vol_creation_time; time_t vol_creation_time;
time_t vol_modification_time; time_t vol_modification_time;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.06.27.184552" #define Xorriso_timestamP "2012.06.27.184915"