Enabled multi-session with partition offset
This commit is contained in:
parent
bc9e0ab92c
commit
2ad974f639
@ -155,7 +155,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
{
|
||||
int ret, hret, not_writeable= 0, has_what, aquire_flag, load_lba, ext;
|
||||
int lba, track, session, params_flag, adr_mode, read_ret;
|
||||
uint32_t size;
|
||||
uint32_t size, offst;
|
||||
struct burn_drive_info *dinfo= NULL, *out_dinfo, *in_dinfo;
|
||||
struct burn_drive *drive= NULL, *out_drive, *in_drive;
|
||||
enum burn_disc_status state;
|
||||
@ -233,6 +233,16 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
state= isoburn_disc_get_status(dinfo[0].drive);
|
||||
ret= isoburn_get_img_partition_offset(dinfo[0].drive, &offst);
|
||||
if((state == BURN_DISC_APPENDABLE || state == BURN_DISC_FULL) && ret == 1) {
|
||||
sprintf(xorriso->info_text,
|
||||
"ISO image bears MBR with -boot_image any partition_offset=%lu",
|
||||
(unsigned long) offst);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
}
|
||||
|
||||
if(flag&1)
|
||||
if(xorriso->image_start_mode&(1<<31)) /* used up setting */
|
||||
xorriso->image_start_mode= 0; /* no need to perform auto setting */
|
||||
@ -242,6 +252,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
xorriso->outdev_is_exclusive= xorriso->drives_exclusive;
|
||||
}
|
||||
drive= dinfo[0].drive;
|
||||
state= isoburn_disc_get_status(drive);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(flag&1) {
|
||||
if(xorriso->image_start_mode&(1<<31)) /* used up setting */
|
||||
xorriso->image_start_mode&= ~0xffff; /* perform auto setting */
|
||||
@ -279,8 +291,6 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
xorriso->image_start_mode|= (1<<31); /* mark as used up */
|
||||
}
|
||||
}
|
||||
state= isoburn_disc_get_status(drive);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(flag&1) {
|
||||
volset= isoburn_get_attached_image(drive);
|
||||
if(volset != NULL) { /* The image object is already created */
|
||||
|
@ -213,6 +213,8 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
unsigned char *ub;
|
||||
ElToritoBootImage *bootimg;
|
||||
IsoFile *bootimg_node;
|
||||
uint32_t offst;
|
||||
enum burn_disc_status state;
|
||||
|
||||
system_area_options= xorriso->system_area_options;
|
||||
memset(buf, 0, 32768);
|
||||
@ -308,7 +310,19 @@ do_set:;
|
||||
0, "FAILURE", 1);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ret= isoburn_igopt_set_part_offset(sopts, xorriso->partition_offset,
|
||||
offst= xorriso->partition_offset;
|
||||
state= isoburn_disc_get_status(drive);
|
||||
if(state == BURN_DISC_APPENDABLE) {
|
||||
ret= isoburn_get_img_partition_offset(drive, &offst);
|
||||
if(ret == 1) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Preserving in ISO image: -boot_image any partition_offset=%lu",
|
||||
(unsigned long) offst);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
} else
|
||||
offst= xorriso->partition_offset;
|
||||
}
|
||||
ret= isoburn_igopt_set_part_offset(sopts, offst,
|
||||
xorriso->partition_secs_per_head,
|
||||
xorriso->partition_heads_per_cyl);
|
||||
if(ret != ISO_SUCCESS) {
|
||||
@ -532,17 +546,6 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
if(ret<=0)
|
||||
return(0);
|
||||
|
||||
/* <<< TWINTREE: preliminary */
|
||||
if(xorriso->partition_offset > 0) {
|
||||
s= isoburn_disc_get_status(drive);
|
||||
if(s != BURN_DISC_BLANK) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Output drive not blank with non-zero partition offset");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
}
|
||||
|
||||
if(xorriso->out_drive_handle == xorriso->in_drive_handle) {
|
||||
source_drive= drive;
|
||||
} else {
|
||||
@ -701,11 +704,6 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
((!!(xorriso->do_md5 & 8)) * isoburn_igopt_file_stability);
|
||||
if(xorriso->no_emul_toc & 1)
|
||||
ext|= isoburn_igopt_no_emul_toc;
|
||||
|
||||
/* <<< TWINTREE: preliminary */
|
||||
if(xorriso->partition_offset > 0)
|
||||
ext|= isoburn_igopt_no_emul_toc;
|
||||
|
||||
isoburn_igopt_set_extensions(sopts, ext);
|
||||
isoburn_igopt_set_relaxed(sopts, relax);
|
||||
isoburn_igopt_set_sort_files(sopts, 1);
|
||||
|
@ -9,7 +9,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH XORRISO 1 "Sep 04, 2010"
|
||||
.TH XORRISO 1 "Sep 10, 2010"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -2393,15 +2393,15 @@ then those parameters get updated when the new System Area is written.
|
||||
Special "system_area=/dev/zero" causes 32k of NUL-bytes.
|
||||
Use this to discard an MBR which eventually was loaded with the ISO image.
|
||||
.br
|
||||
\fBpartition_offset=\fR2kb_block_adr causes a partition table where the
|
||||
first partition begins at the given block address. This is counted in 2 kB
|
||||
\fBpartition_offset=\fR2kb_block_adr causes a partition table with a single
|
||||
partition that begins at the given block address. This is counted in 2048 byte
|
||||
blocks, not in 512 byte blocks. If the block address is non-zero then it must
|
||||
be at least 16. A non-zero partition offset causes two susperblocks to be
|
||||
be at least 16. A non-zero partition offset causes two superblocks to be
|
||||
generated and two sets of directory trees. The image is then mountable from its
|
||||
absolute start as well as from the partition start.
|
||||
.br
|
||||
Preliminary restrictions: Non-zero offset works only with blank output media
|
||||
and implies -compliance no_emul_toc.
|
||||
The offset value of an ISO image gets preserved when a new session is added.
|
||||
So the value defined here is only in effect if a new ISO image gets written.
|
||||
.br
|
||||
\fBpartition_sec_hd=\fRnumber gives the number of sectors per head for
|
||||
partition offset. 0 chooses a default value.
|
||||
@ -3304,6 +3304,9 @@ instead of -G to apply the effect of -boot_image isolinux partition_table=on.
|
||||
.br
|
||||
--boot-catalog-hide is -boot_image any cat_hidden=on.
|
||||
.br
|
||||
-partition_offset number is
|
||||
-boot_image any partition_offset=number.
|
||||
.br
|
||||
Personalites "\fBxorrisofs\fR", "\fBgenisoimage\fR",
|
||||
and "\fBgenisofs\fR" are aliases for "mkisofs".
|
||||
.br
|
||||
|
@ -1856,7 +1856,7 @@ will be written according to the setting of option -acl.
|
||||
literally. It must consist of 16 decimal digits which form
|
||||
YYYYMMDDhhmmsscc, with YYYY between 1970 and 2999. Time zone is
|
||||
GMT. It is supposed to match this GRUB line:
|
||||
search -fs-uuid -set YYYY-MM-DD-hh-mm-ss-cc
|
||||
search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc
|
||||
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
||||
Timestrings for the other types may be given as with option
|
||||
-alter_date. They are prone to timezone computations. The
|
||||
@ -2129,15 +2129,16 @@ of the existing sessions, unless one can assume overwriteable media.
|
||||
when the new System Area is written.
|
||||
Special "system_area=/dev/zero" causes 32k of NUL-bytes. Use this
|
||||
to discard an MBR which eventually was loaded with the ISO image.
|
||||
*partition_offset=*2kb_block_adr causes a partition table where the
|
||||
first partition begins at the given block address. This is counted
|
||||
in 2 kB blocks, not in 512 byte blocks. If the block address is
|
||||
non-zero then it must be at least 16. A non-zero partition offset
|
||||
causes two susperblocks to be generated and two sets of directory
|
||||
trees. The image is then mountable from its absolute start as well
|
||||
as from the partition start.
|
||||
Preliminary restrictions: Non-zero offset works only with blank
|
||||
output media and implies -compliance no_emul_toc.
|
||||
*partition_offset=*2kb_block_adr causes a partition table with a
|
||||
single partition that begins at the given block address. This is
|
||||
counted in 2048 byte blocks, not in 512 byte blocks. If the block
|
||||
address is non-zero then it must be at least 16. A non-zero
|
||||
partition offset causes two superblocks to be generated and two
|
||||
sets of directory trees. The image is then mountable from its
|
||||
absolute start as well as from the partition start.
|
||||
The offset value of an ISO image gets preserved when a new session
|
||||
is added. So the value defined here is only in effect if a new
|
||||
ISO image gets written.
|
||||
*partition_sec_hd=*number gives the number of sectors per head for
|
||||
partition offset. 0 chooses a default value.
|
||||
*partition_hd_cyl=*number gives the number of heads per cylinder
|
||||
@ -2950,7 +2951,9 @@ programs trigger comparable actions.
|
||||
where FILE is one of the Syslinux files mbr/isohdp[fp]x*.bin . Use
|
||||
this instead of -G to apply the effect of -boot_image isolinux
|
||||
partition_table=on.
|
||||
-boot-catalog-hide is -boot_image any cat_hidden=on.
|
||||
--boot-catalog-hide is -boot_image any cat_hidden=on.
|
||||
-partition_offset number is -boot_image any
|
||||
partition_offset=number.
|
||||
Personalites "*xorrisofs*", "*genisoimage*", and "*genisofs*" are
|
||||
aliases for "mkisofs".
|
||||
If xorriso is started with one of the leafnames "xorrisofs",
|
||||
@ -3870,7 +3873,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -out_charset sets output character set: SetWrite. (line 156)
|
||||
* -outdev aquires a drive for output: AqDrive. (line 29)
|
||||
* -overwrite enables overwriting in ISO: SetInsert. (line 127)
|
||||
* -pacifier controls pacifier text form: Emulation. (line 121)
|
||||
* -pacifier controls pacifier text form: Emulation. (line 123)
|
||||
* -padding sets amount of image padding: SetWrite. (line 239)
|
||||
* -page set terminal geometry: DialogCtl. (line 15)
|
||||
* -paste_in copies file into disk file: Restore. (line 117)
|
||||
@ -3890,7 +3893,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -quoted_not_list sets exclusions: SetInsert. (line 72)
|
||||
* -quoted_path_list inserts paths from disk file: Insert. (line 80)
|
||||
* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation.
|
||||
(line 109)
|
||||
(line 111)
|
||||
* -reassure enables confirmation question: DialogCtl. (line 28)
|
||||
* -report_about controls verbosity: Exception. (line 55)
|
||||
* -return_with controls exit value: Exception. (line 39)
|
||||
@ -3900,7 +3903,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -rollback discards pending changes: Writing. (line 9)
|
||||
* -rollback_end ends program without writing: Scripting. (line 125)
|
||||
* -rom_toc_scan searches for sessions: Loading. (line 184)
|
||||
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 131)
|
||||
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 133)
|
||||
* -scsi_log reports SCSI commands: Scripting. (line 113)
|
||||
* -session_log logs written sessions: Scripting. (line 104)
|
||||
* -session_string composes session info line: Inquiry. (line 56)
|
||||
@ -3956,11 +3959,11 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Backslash Interpretation, _definition: Processing. (line 49)
|
||||
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163)
|
||||
* Backup, enable features, -for_backup: Loading. (line 158)
|
||||
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 131)
|
||||
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 133)
|
||||
* Blank media, _definition: Media. (line 29)
|
||||
* Blind growing, _definition: Methods. (line 40)
|
||||
* Bootability, control, -boot_image: Bootable. (line 20)
|
||||
* cdrecord, Emulation: Emulation. (line 76)
|
||||
* cdrecord, Emulation: Emulation. (line 78)
|
||||
* Character Set, _definition: Charset. (line 6)
|
||||
* Character Set, for input, -in_charset: Loading. (line 73)
|
||||
* Character Set, for input/output, -charset: Charset. (line 43)
|
||||
@ -3995,10 +3998,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Drive, write and eject, -commit_eject: Writing. (line 40)
|
||||
* El Torito, _definiton: Extras. (line 19)
|
||||
* Emulation, -as: Emulation. (line 13)
|
||||
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 109)
|
||||
* Emulation, cdrecord, -as: Emulation. (line 76)
|
||||
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 111)
|
||||
* Emulation, cdrecord, -as: Emulation. (line 78)
|
||||
* Emulation, mkisofs, -as: Emulation. (line 16)
|
||||
* Emulation, pacifier form, -pacifier: Emulation. (line 121)
|
||||
* Emulation, pacifier form, -pacifier: Emulation. (line 123)
|
||||
* Examples: Examples. (line 6)
|
||||
* Filter, _definition: Filter. (line 6)
|
||||
* Filter, apply to file tree, -set_filter_r: Filter. (line 84)
|
||||
@ -4196,38 +4199,38 @@ Node: CmdFind65439
|
||||
Node: Filter75390
|
||||
Node: Writing79739
|
||||
Node: SetWrite86028
|
||||
Node: Bootable97977
|
||||
Node: Charset107016
|
||||
Node: Exception109770
|
||||
Node: DialogCtl114285
|
||||
Node: Inquiry116630
|
||||
Node: Navigate120760
|
||||
Node: Verify128358
|
||||
Node: Restore136778
|
||||
Node: Emulation143434
|
||||
Node: Scripting151157
|
||||
Node: Frontend156719
|
||||
Node: Examples157920
|
||||
Node: ExDevices159089
|
||||
Node: ExCreate159723
|
||||
Node: ExDialog160997
|
||||
Node: ExGrowing162259
|
||||
Node: ExModifying163061
|
||||
Node: ExBootable163562
|
||||
Node: ExCharset164109
|
||||
Node: ExPseudo164937
|
||||
Node: ExCdrecord165831
|
||||
Node: ExMkisofs166146
|
||||
Node: ExGrowisofs167149
|
||||
Node: ExException168273
|
||||
Node: ExTime168727
|
||||
Node: ExIncBackup169186
|
||||
Node: ExRestore172658
|
||||
Node: ExRecovery173627
|
||||
Node: Files174193
|
||||
Node: Seealso175421
|
||||
Node: Legal175945
|
||||
Node: CommandIdx176867
|
||||
Node: ConceptIdx190673
|
||||
Node: Bootable97979
|
||||
Node: Charset107071
|
||||
Node: Exception109825
|
||||
Node: DialogCtl114340
|
||||
Node: Inquiry116685
|
||||
Node: Navigate120815
|
||||
Node: Verify128413
|
||||
Node: Restore136833
|
||||
Node: Emulation143489
|
||||
Node: Scripting151292
|
||||
Node: Frontend156854
|
||||
Node: Examples158055
|
||||
Node: ExDevices159224
|
||||
Node: ExCreate159858
|
||||
Node: ExDialog161132
|
||||
Node: ExGrowing162394
|
||||
Node: ExModifying163196
|
||||
Node: ExBootable163697
|
||||
Node: ExCharset164244
|
||||
Node: ExPseudo165072
|
||||
Node: ExCdrecord165966
|
||||
Node: ExMkisofs166281
|
||||
Node: ExGrowisofs167284
|
||||
Node: ExException168408
|
||||
Node: ExTime168862
|
||||
Node: ExIncBackup169321
|
||||
Node: ExRestore172793
|
||||
Node: ExRecovery173762
|
||||
Node: Files174328
|
||||
Node: Seealso175556
|
||||
Node: Legal176080
|
||||
Node: CommandIdx177002
|
||||
Node: ConceptIdx190808
|
||||
|
||||
End Tag Table
|
||||
|
@ -44,7 +44,7 @@
|
||||
@c man .\" First parameter, NAME, should be all caps
|
||||
@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 .TH XORRISO 1 "Sep 04, 2010"
|
||||
@c man .TH XORRISO 1 "Sep 10, 2010"
|
||||
@c man .\" Please adjust this date whenever revising the manpage.
|
||||
@c man .\"
|
||||
@c man .\" Some roff macros, for reference:
|
||||
@ -2498,7 +2498,7 @@ It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with
|
||||
YYYY between 1970 and 2999. Time zone is GMT.
|
||||
It is supposed to match this GRUB line:
|
||||
@*
|
||||
search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc
|
||||
search @minus{}@minus{}fs-uuid @minus{}@minus{}set YYYY-MM-DD-hh-mm-ss-cc
|
||||
@*
|
||||
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
||||
@*
|
||||
@ -2862,15 +2862,15 @@ Special "system_area=/dev/zero" causes 32k of NUL-bytes.
|
||||
Use this to discard an MBR which eventually was loaded with the ISO image.
|
||||
@*
|
||||
@cindex Partition offset, _definiton
|
||||
@strong{partition_offset=}2kb_block_adr causes a partition table where the
|
||||
first partition begins at the given block address. This is counted in 2 kB
|
||||
@strong{partition_offset=}2kb_block_adr causes a partition table with a single
|
||||
partition that begins at the given block address. This is counted in 2048 byte
|
||||
blocks, not in 512 byte blocks. If the block address is non-zero then it must
|
||||
be at least 16. A non-zero partition offset causes two susperblocks to be
|
||||
be at least 16. A non-zero partition offset causes two superblocks to be
|
||||
generated and two sets of directory trees. The image is then mountable from its
|
||||
absolute start as well as from the partition start.
|
||||
@*
|
||||
Preliminary restrictions: Non-zero offset works only with blank output media
|
||||
and implies -compliance no_emul_toc.
|
||||
The offset value of an ISO image gets preserved when a new session is added.
|
||||
So the value defined here is only in effect if a new ISO image gets written.
|
||||
@*
|
||||
@strong{partition_sec_hd=}number gives the number of sectors per head for
|
||||
partition offset. 0 chooses a default value.
|
||||
@ -3939,7 +3939,10 @@ For MBR bootable ISOLINUX images there is -isohybrid-mbr FILE, where
|
||||
FILE is one of the Syslinux files mbr/isohdp[fp]x*.bin . Use this
|
||||
instead of -G to apply the effect of -boot_image isolinux partition_table=on.
|
||||
@*
|
||||
--boot-catalog-hide is -boot_image any cat_hidden=on.
|
||||
@minus{}@minus{}boot-catalog-hide is -boot_image any cat_hidden=on.
|
||||
@*
|
||||
@minus{}partition_offset number is
|
||||
@minus{}boot_image any partition_offset=number.
|
||||
@*
|
||||
Personalites "@strong{xorrisofs}", "@strong{genisoimage}",
|
||||
and "@strong{genisofs}" are aliases for "mkisofs".
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.09.10.170925"
|
||||
#define Xorriso_timestamP "2010.09.10.171223"
|
||||
|
Loading…
Reference in New Issue
Block a user