Allowed writing with read displacement if target media is blank

This commit is contained in:
Thomas Schmitt 2010-12-06 09:44:02 +00:00
parent dff6c45a42
commit fcf0089584
6 changed files with 98 additions and 85 deletions

View File

@ -1724,8 +1724,11 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
strcpy(newdev, xorriso->outdev);
if(xorriso->grow_blindly_msc2>=0)
ret= Xorriso_option_dev(xorriso, "", 3|4);
else
else {
xorriso->displacement= 0;
xorriso->displacement_sign= 0;
ret= Xorriso_option_dev(xorriso, newdev, 3|4);
}
return(ret);
}

View File

@ -549,13 +549,6 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
char profile_name[80];
IsoBoot *bootcat_node;
if(abs(xorriso->displacement_sign) == 1 && xorriso->displacement != 0) {
sprintf(xorriso->info_text,
"May not write session while -displacement is non-zero");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ret= Xorriso_finish_hl_update(xorriso, 0);
if(ret <= 0)
return(ret);
@ -574,7 +567,15 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
if(ret<=0)
return(0);
s= isoburn_disc_get_status(drive);
if(xorriso->out_drive_handle == xorriso->in_drive_handle) {
if(abs(xorriso->displacement_sign) == 1 && xorriso->displacement != 0 &&
s != BURN_DISC_BLANK) {
sprintf(xorriso->info_text,
"May not grow ISO image while -displacement is non-zero");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
source_drive= drive;
} else {
if(xorriso->in_drive_handle == NULL) {
@ -585,7 +586,6 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
if(ret<=0)
goto ex;
}
s= isoburn_disc_get_status(drive);
if(s!=BURN_DISC_BLANK) {
s= burn_disc_get_status(drive);
if(s!=BURN_DISC_BLANK)

View File

@ -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 "Dec 04, 2010"
.TH XORRISO 1 "Dec 06, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -644,8 +644,11 @@ will be reset to "auto".
\fB\-displacement\fR [-]lba
Compensate an eventual displacement of the image versus the start address
for which the image was prepared. This affects only loading of ISO images
and reading of their files. Writing is not allowed as long as -displacement
is non-zero.
and reading of their files. The multi-session method of growing is not allowed
as long as -displacement is non-zero. I.e. -indev and -outdev must be
different. Eventually the displacement is reset to 0 before the drive
gets re-aquired after writing.
.br
Examples:
.br
If a track of a CD starts at block 123456 and gets copied to a disk file

View File

@ -610,8 +610,12 @@ activate them only after image loading.
-displacement [-]lba
Compensate an eventual displacement of the image versus the start
address for which the image was prepared. This affects only
loading of ISO images and reading of their files. Writing is not
allowed as long as -displacement is non-zero. Examples:
loading of ISO images and reading of their files. The
multi-session method of growing is not allowed as long as
-displacement is non-zero. I.e. -indev and -outdev must be
different. Eventually the displacement is reset to 0 before the
drive gets re-aquired after writing.
Examples:
If a track of a CD starts at block 123456 and gets copied to a
disk file where it begins at block 0, then this copy can be loaded
with -displacement -123456.
@ -3921,7 +3925,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* # starts a comment line: Scripting. (line 128)
* -abort_on controls abort on error: Exception. (line 27)
* -abstract_file sets abstract file name: SetWrite. (line 131)
* -acl controls handling of ACLs: Loading. (line 138)
* -acl controls handling of ACLs: Loading. (line 142)
* -add inserts one or more paths: Insert. (line 42)
* -add_plainly inserts one or more paths: Insert. (line 61)
* -alter_date sets timestamps in ISO image: Manip. (line 146)
@ -3930,14 +3934,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
(line 186)
* -application_id sets application id: SetWrite. (line 90)
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
* -assert_volid rejects undesired images: Loading. (line 80)
* -auto_charset learns character set from image: Loading. (line 95)
* -assert_volid rejects undesired images: Loading. (line 84)
* -auto_charset learns character set from image: Loading. (line 99)
* -backslash_codes enables backslash conversion: Scripting. (line 45)
* -ban_stdio_write demands real drive: Loading. (line 235)
* -ban_stdio_write demands real drive: Loading. (line 239)
* -biblio_file sets biblio file name: SetWrite. (line 138)
* -blank erases media: Writing. (line 45)
* -boot_image controls bootability: Bootable. (line 26)
* -calm_drive reduces drive activity: Loading. (line 224)
* -calm_drive reduces drive activity: Loading. (line 228)
* -cd sets working directory in ISO: Navigate. (line 7)
* -cdx sets working directory on disk: Navigate. (line 16)
* -charset sets input/output character set: Charset. (line 43)
@ -3968,11 +3972,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -dev aquires one drive for input and output: AqDrive. (line 10)
* -devices gets list of drives: Inquiry. (line 7)
* -dialog enables dialog mode: DialogCtl. (line 7)
* -disk_dev_ino fast incremental backup: Loading. (line 178)
* -disk_dev_ino fast incremental backup: Loading. (line 182)
* -disk_pattern controls pattern expansion: Insert. (line 31)
* -displacement compensate altered image start address: Loading.
(line 35)
* -drive_class controls drive accessability: Loading. (line 50)
* -drive_class controls drive accessability: Loading. (line 54)
* -du show directory size in ISO image: Navigate. (line 88)
* -dummy controls write simulation: SetWrite. (line 222)
* -dus show directory size in ISO image: Navigate. (line 92)
@ -3993,7 +3997,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -find traverses and alters ISO tree: CmdFind. (line 7)
* -findx traverses disk tree: Navigate. (line 105)
* -follow softlinks and mount points: SetInsert. (line 76)
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 173)
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 177)
* -format formats media: Writing. (line 69)
* -fs sets size of fifo: SetWrite. (line 226)
* -getfacl shows ACL in ISO image: Navigate. (line 69)
@ -4002,11 +4006,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -getfattr_r shows xattr in ISO image: Navigate. (line 84)
* -gid sets global ownership: SetWrite. (line 166)
* -grow_blindly overides next writeable address: AqDrive. (line 44)
* -hardlinks controls handling of hard links: Loading. (line 106)
* -hardlinks controls handling of hard links: Loading. (line 110)
* -help prints help text: Scripting. (line 16)
* -hide excludes file names from directory trees: Manip. (line 170)
* -history brings text into readline history: Scripting. (line 22)
* -in_charset sets input character set: Loading. (line 88)
* -in_charset sets input character set: Loading. (line 92)
* -indev aquires a drive for input: AqDrive. (line 22)
* -iso_rr_pattern controls pattern expansion: Manip. (line 10)
* -jigdo clears JTE or sets input/output character set: Jigdo.
@ -4030,7 +4034,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -map_l inserts paths from disk file: Insert. (line 94)
* -map_single inserts path: Insert. (line 90)
* -mark sets synchronizing message: Frontend. (line 25)
* -md5 controls handling of MD5 sums: Loading. (line 151)
* -md5 controls handling of MD5 sums: Loading. (line 155)
* -mkdir creates ISO directory: Insert. (line 166)
* -mount issues mount command for ISO session: Restore. (line 122)
* -mount_cmd composes mount command line: Inquiry. (line 31)
@ -4075,7 +4079,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -rmdir deletes ISO directory: Manip. (line 32)
* -rollback discards pending changes: Writing. (line 9)
* -rollback_end ends program without writing: Scripting. (line 125)
* -rom_toc_scan searches for sessions: Loading. (line 199)
* -rom_toc_scan searches for sessions: Loading. (line 203)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 142)
* -scsi_log reports SCSI commands: Scripting. (line 113)
* -session_log logs written sessions: Scripting. (line 104)
@ -4109,7 +4113,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -volid sets volume id: SetWrite. (line 60)
* -volset_id sets volume set id: SetWrite. (line 79)
* -volume_date sets volume timestamp: SetWrite. (line 106)
* -xattr controls handling of xattr (EA): Loading. (line 146)
* -xattr controls handling of xattr (EA): Loading. (line 150)
* -zisofs controls zisofs production: SetWrite. (line 170)

@ -4122,7 +4126,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Menu:
* ACL, _definiton: Extras. (line 37)
* ACL, control handling, -acl: Loading. (line 138)
* ACL, control handling, -acl: Loading. (line 142)
* ACL, set in ISO image, -setfacl: Manip. (line 73)
* ACL, set in ISO image, -setfacl_list: Manip. (line 100)
* ACL, set in ISO image, -setfacl_r: Manip. (line 97)
@ -4131,18 +4135,18 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Appendable media, _definition: Media. (line 38)
* Appended Filesystem Image, -append_partition: Bootable. (line 186)
* Backslash Interpretation, _definition: Processing. (line 49)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 178)
* Backup, enable features, -for_backup: Loading. (line 173)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 182)
* Backup, enable features, -for_backup: Loading. (line 177)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 142)
* Blank media, _definition: Media. (line 29)
* Blind growing, _definition: Methods. (line 40)
* Bootability, control, -boot_image: Bootable. (line 26)
* cdrecord, Emulation: Emulation. (line 87)
* Character Set, _definition: Charset. (line 6)
* Character Set, for input, -in_charset: Loading. (line 88)
* Character Set, for input, -in_charset: Loading. (line 92)
* Character Set, for input/output, -charset: Charset. (line 43)
* Character Set, for output, -out_charset: SetWrite. (line 156)
* Character set, learn from image, -auto_charset: Loading. (line 95)
* Character set, learn from image, -auto_charset: Loading. (line 99)
* Character Set, of terminal, -local_charset: Charset. (line 47)
* Closed media, _definition: Media. (line 43)
* Comment, #: Scripting. (line 128)
@ -4159,15 +4163,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Directory, delete, -rmdir: Manip. (line 32)
* disk_path, _definition: Insert. (line 6)
* Drive, _definiton: Drives. (line 6)
* Drive, accessability, -drive_class: Loading. (line 50)
* Drive, demand real MMC, -ban_stdio_write: Loading. (line 235)
* Drive, accessability, -drive_class: Loading. (line 54)
* Drive, demand real MMC, -ban_stdio_write: Loading. (line 239)
* Drive, eject tray, -eject: Writing. (line 36)
* Drive, for input and output, -dev: AqDrive. (line 10)
* Drive, for input, -indev: AqDrive. (line 22)
* Drive, for output, -outdev: AqDrive. (line 29)
* Drive, get drive list, -devices: Inquiry. (line 7)
* Drive, list supported media, -list_profiles: Writing. (line 119)
* Drive, reduce activity, -calm_drive: Loading. (line 224)
* Drive, reduce activity, -calm_drive: Loading. (line 228)
* Drive, report SCSI commands, -scsi_log: Scripting. (line 113)
* Drive, write and eject, -commit_eject: Writing. (line 40)
* El Torito, _definiton: Extras. (line 19)
@ -4190,10 +4194,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Group, in ISO image, -chgrp: Manip. (line 50)
* Group, in ISO image, -chgrp_r: Manip. (line 55)
* Growing, _definition: Methods. (line 19)
* Hard links, control handling, -hardlinks: Loading. (line 106)
* Hard links, control handling, -hardlinks: Loading. (line 110)
* hidden, set in ISO image, -hide: Manip. (line 170)
* Image, _definition: Model. (line 9)
* Image, demand volume id, -assert_volid: Loading. (line 80)
* Image, demand volume id, -assert_volid: Loading. (line 84)
* Image, discard pending changes, -rollback: Writing. (line 9)
* Image, set abstract file name, -abstract_file: SetWrite. (line 131)
* Image, set application id, -application_id: SetWrite. (line 90)
@ -4234,7 +4238,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* List delimiter, _definiton: Processing. (line 8)
* MBR, _definiton: Extras. (line 26)
* MBR, set, -boot_image system_area=: Bootable. (line 123)
* MD5, control handling, -md5: Loading. (line 151)
* MD5, control handling, -md5: Loading. (line 155)
* Media, erase, -blank: Writing. (line 45)
* Media, format, -format: Writing. (line 69)
* Media, list formats, -list_formats: Writing. (line 107)
@ -4320,7 +4324,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* SUN Disk Label, production: Bootable. (line 173)
* SUN SPARC boot images, activation: Bootable. (line 207)
* System area, _definiton: Bootable. (line 123)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 199)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 203)
* Table-of-content, show, -toc: Inquiry. (line 18)
* Timestamps, set in ISO image, -alter_date: Manip. (line 146)
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 166)
@ -4350,7 +4354,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Write, set speed, -speed: SetWrite. (line 182)
* Write, simulation, -dummy: SetWrite. (line 222)
* xattr, _definiton: Extras. (line 51)
* xattr, control handling, -xattr: Loading. (line 146)
* xattr, control handling, -xattr: Loading. (line 150)
* xattr, set in ISO image, -setfattr: Manip. (line 110)
* xattr, set in ISO image, -setfattr_list: Manip. (line 126)
* xattr, set in ISO image, -setfattr_r: Manip. (line 123)
@ -4372,46 +4376,46 @@ Node: Dialog21524
Node: Options23181
Node: AqDrive24789
Node: Loading27695
Node: Insert40659
Node: SetInsert49016
Node: Manip57583
Node: CmdFind66264
Node: Filter76509
Node: Writing80858
Node: SetWrite87147
Node: Bootable99098
Node: Jigdo111405
Node: Charset115663
Node: Exception118414
Node: DialogCtl122929
Node: Inquiry125274
Node: Navigate129404
Node: Verify137002
Node: Restore145422
Node: Emulation152078
Node: Scripting160367
Node: Frontend165929
Node: Examples167224
Node: ExDevices168393
Node: ExCreate169027
Node: ExDialog170301
Node: ExGrowing171563
Node: ExModifying172365
Node: ExBootable172866
Node: ExCharset173413
Node: ExPseudo174241
Node: ExCdrecord175135
Node: ExMkisofs175450
Node: ExGrowisofs176453
Node: ExException177577
Node: ExTime178031
Node: ExIncBackup178490
Node: ExRestore181962
Node: ExRecovery182931
Node: Files183497
Node: Seealso184725
Node: Legal185249
Node: CommandIdx186171
Node: ConceptIdx200397
Node: Insert40839
Node: SetInsert49196
Node: Manip57763
Node: CmdFind66444
Node: Filter76689
Node: Writing81038
Node: SetWrite87327
Node: Bootable99278
Node: Jigdo111585
Node: Charset115843
Node: Exception118594
Node: DialogCtl123109
Node: Inquiry125454
Node: Navigate129584
Node: Verify137182
Node: Restore145602
Node: Emulation152258
Node: Scripting160547
Node: Frontend166109
Node: Examples167404
Node: ExDevices168573
Node: ExCreate169207
Node: ExDialog170481
Node: ExGrowing171743
Node: ExModifying172545
Node: ExBootable173046
Node: ExCharset173593
Node: ExPseudo174421
Node: ExCdrecord175315
Node: ExMkisofs175630
Node: ExGrowisofs176633
Node: ExException177757
Node: ExTime178211
Node: ExIncBackup178670
Node: ExRestore182142
Node: ExRecovery183111
Node: Files183677
Node: Seealso184905
Node: Legal185429
Node: CommandIdx186351
Node: ConceptIdx200577

End Tag Table

View File

@ -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 "Dec 04, 2010"
@c man .TH XORRISO 1 "Dec 06, 2010"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -842,8 +842,11 @@ will be reset to "auto".
@cindex Session, altered start address, -displacement
Compensate an eventual displacement of the image versus the start address
for which the image was prepared. This affects only loading of ISO images
and reading of their files. Writing is not allowed as long as -displacement
is non-zero.
and reading of their files. The multi-session method of growing is not allowed
as long as -displacement is non-zero. I.e. -indev and -outdev must be
different. Eventually the displacement is reset to 0 before the drive
gets re-aquired after writing.
@*
Examples:
@*
If a track of a CD starts at block 123456 and gets copied to a disk file

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.12.04.174431"
#define Xorriso_timestamP "2010.12.06.094347"