No -rollback in -as mkisofs -print-size. New flag in Xorriso_change_is_pending.
This commit is contained in:
parent
8ad6bff397
commit
65fdba8884
@ -1678,8 +1678,8 @@ ex:;
|
||||
if(was_path && !do_print_size)
|
||||
Xorriso_pacifier_callback(xorriso, "files added", xorriso->pacifier_count,
|
||||
xorriso->pacifier_total, "", 1);
|
||||
if(do_print_size && xorriso->volset_change_pending)
|
||||
Xorriso_option_rollback(xorriso, 0);
|
||||
if(do_print_size && xorriso->volset_change_pending == 1)
|
||||
xorriso->volset_change_pending= 2;
|
||||
if(weight_list != NULL)
|
||||
free(weight_list);
|
||||
if(delay_opt_list != NULL)
|
||||
|
@ -854,6 +854,8 @@ int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume,
|
||||
|
||||
int Xorriso_change_is_pending(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
if(flag & 1)
|
||||
return(xorriso->volset_change_pending == 1);
|
||||
return(!!xorriso->volset_change_pending);
|
||||
}
|
||||
|
||||
@ -867,7 +869,9 @@ int Xorriso_set_change_pending(struct XorrisO *xorriso, int flag)
|
||||
ret= Xorriso_get_volume(xorriso, &image, 1);
|
||||
if(ret <= 0)
|
||||
return ret;
|
||||
xorriso->volset_change_pending= 1;
|
||||
/* Do not override mark of -as mkisofs -print-size */
|
||||
if(xorriso->volset_change_pending != 2)
|
||||
xorriso->volset_change_pending= 1;
|
||||
if(!(flag & 1))
|
||||
xorriso->hln_change_pending= 1;
|
||||
return(1);
|
||||
|
@ -341,7 +341,7 @@ int Xorriso_option_end(struct XorrisO *xorriso, int flag)
|
||||
else
|
||||
cmd= "-end";
|
||||
if(xorriso->volset_change_pending) {
|
||||
if(flag&1)
|
||||
if((flag & 1) || xorriso->volset_change_pending != 1)
|
||||
which_will= "end the program discarding image changes";
|
||||
else
|
||||
which_will= "commit image changes and then end the program";
|
||||
@ -355,7 +355,7 @@ int Xorriso_option_end(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
if(xorriso->volset_change_pending) {
|
||||
if(flag&1) {
|
||||
if((flag & 1) || xorriso->volset_change_pending != 1) {
|
||||
xorriso->volset_change_pending= 0;
|
||||
} else {
|
||||
ret= Xorriso_option_commit(xorriso, 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 "Nov 05, 2010"
|
||||
.TH XORRISO 1 "Dec 02, 2010"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -3460,6 +3460,9 @@ Writing to stdout is possible only if -as "mkisofs" was among the start
|
||||
arguments or if other start arguments pointed the output drive to
|
||||
standard output.
|
||||
.br
|
||||
-print-size inhibits automatic image production at program end. This ban is
|
||||
lifted only if the pending image changes get discarded.
|
||||
.br
|
||||
Not original mkisofs options are --quoted_path_list ,
|
||||
--hardlinks , --acl ,
|
||||
--xattr , --md5 , --stdio_sync .
|
||||
@ -3775,8 +3778,9 @@ Copy output of a channel to the given file. Channel may be one of: "." for all
|
||||
channels, "I" for info messages, "R" for result lines, "M" for -mark texts.
|
||||
.TP
|
||||
\fB\-mark\fR text
|
||||
If text is not empty it will get put out on "M" channel each time after a
|
||||
dialog line has been processed.
|
||||
If text is not empty it will get put out on "M" channel each time xorriso
|
||||
is ready for the next dialog line or before xorriso performs a command that
|
||||
was entered to the pager prompt.
|
||||
.TP
|
||||
\fB\-prog\fR text
|
||||
Use text as name of this program in subsequent messages
|
||||
|
@ -197,7 +197,9 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
|
||||
|
||||
/* Inquire whether option -commit would make sense.
|
||||
@param xorriso The context object to inquire.
|
||||
@param flag unused yet, submit 0
|
||||
@param flag @since 0.6.6
|
||||
bit0= do not return 1 if -as mkisofs -print-size was
|
||||
performed on the current image.
|
||||
@return 0= -commit would have nothing to do
|
||||
1= a new image session would emerge at -commit
|
||||
*/
|
||||
|
@ -3082,6 +3082,8 @@ programs trigger comparable actions.
|
||||
Writing to stdout is possible only if -as "mkisofs" was among the
|
||||
start arguments or if other start arguments pointed the output
|
||||
drive to standard output.
|
||||
-print-size inhibits automatic image production at program end.
|
||||
This ban is lifted only if the pending image changes get discarded.
|
||||
Not original mkisofs options are --quoted_path_list , --hardlinks
|
||||
, --acl , --xattr , --md5 , --stdio_sync . They work like the
|
||||
xorriso options with the same name and hardcoded argument "on",
|
||||
@ -3344,7 +3346,8 @@ File: xorriso.info, Node: Frontend, Next: ExDevices, Prev: Scripting, Up: Op
|
||||
|
||||
-mark text
|
||||
If text is not empty it will get put out on "M" channel each time
|
||||
after a dialog line has been processed.
|
||||
xorriso is ready for the next dialog line or before xorriso
|
||||
performs a command that was entered to the pager prompt.
|
||||
|
||||
-prog text
|
||||
Use text as name of this program in subsequent messages
|
||||
@ -4037,7 +4040,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 130)
|
||||
* -pacifier controls pacifier text form: Emulation. (line 132)
|
||||
* -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)
|
||||
@ -4047,8 +4050,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
* -preparer_id sets preparer id: SetWrite. (line 144)
|
||||
* -print prints text line: Scripting. (line 77)
|
||||
* -print_size predicts image size: Inquiry. (line 69)
|
||||
* -prog sets program name: Frontend. (line 29)
|
||||
* -prog_help prints help text: Frontend. (line 32)
|
||||
* -prog sets program name: Frontend. (line 30)
|
||||
* -prog_help prints help text: Frontend. (line 33)
|
||||
* -prompt prompts for enter key: Scripting. (line 80)
|
||||
* -publisher sets publisher id: SetWrite. (line 84)
|
||||
* -pvd_info shows image id strings: Inquiry. (line 78)
|
||||
@ -4057,7 +4060,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 118)
|
||||
(line 120)
|
||||
* -reassure enables confirmation question: DialogCtl. (line 28)
|
||||
* -report_about controls verbosity: Exception. (line 55)
|
||||
* -return_with controls exit value: Exception. (line 39)
|
||||
@ -4067,7 +4070,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 198)
|
||||
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 140)
|
||||
* -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)
|
||||
* -session_string composes session info line: Inquiry. (line 56)
|
||||
@ -4124,11 +4127,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 177)
|
||||
* Backup, enable features, -for_backup: Loading. (line 172)
|
||||
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 140)
|
||||
* 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 85)
|
||||
* cdrecord, Emulation: Emulation. (line 87)
|
||||
* Character Set, _definition: Charset. (line 6)
|
||||
* Character Set, for input, -in_charset: Loading. (line 87)
|
||||
* Character Set, for input/output, -charset: Charset. (line 43)
|
||||
@ -4163,10 +4166,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 118)
|
||||
* Emulation, cdrecord, -as: Emulation. (line 85)
|
||||
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 120)
|
||||
* Emulation, cdrecord, -as: Emulation. (line 87)
|
||||
* Emulation, mkisofs, -as: Emulation. (line 16)
|
||||
* Emulation, pacifier form, -pacifier: Emulation. (line 130)
|
||||
* Emulation, pacifier form, -pacifier: Emulation. (line 132)
|
||||
* Examples: Examples. (line 6)
|
||||
* Filter, _definition: Filter. (line 6)
|
||||
* Filter, apply to file tree, -set_filter_r: Filter. (line 84)
|
||||
@ -4279,12 +4282,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Program, end and write, -end: Scripting. (line 122)
|
||||
* Program, end without writing, -rollback_end: Scripting. (line 125)
|
||||
* Program, print help text, -help: Scripting. (line 16)
|
||||
* Program, print help text, -prog_help: Frontend. (line 32)
|
||||
* Program, print help text, -prog_help: Frontend. (line 33)
|
||||
* Program, print text line, -print: Scripting. (line 77)
|
||||
* Program, print version, -version: Scripting. (line 19)
|
||||
* Program, prompt for enter key, -prompt: Scripting. (line 80)
|
||||
* Program, replace --, -list_delimiter: Scripting. (line 38)
|
||||
* Program, set name, -prog: Frontend. (line 29)
|
||||
* Program, set name, -prog: Frontend. (line 30)
|
||||
* Program, show current settings, -status: Scripting. (line 25)
|
||||
* Program, status history, -status_history_max: Scripting. (line 34)
|
||||
* Quoted input, _definiton: Processing. (line 43)
|
||||
@ -4380,29 +4383,29 @@ Node: Navigate129044
|
||||
Node: Verify136642
|
||||
Node: Restore145062
|
||||
Node: Emulation151718
|
||||
Node: Scripting159865
|
||||
Node: Frontend165427
|
||||
Node: Examples166640
|
||||
Node: ExDevices167809
|
||||
Node: ExCreate168443
|
||||
Node: ExDialog169717
|
||||
Node: ExGrowing170979
|
||||
Node: ExModifying171781
|
||||
Node: ExBootable172282
|
||||
Node: ExCharset172829
|
||||
Node: ExPseudo173657
|
||||
Node: ExCdrecord174551
|
||||
Node: ExMkisofs174866
|
||||
Node: ExGrowisofs175869
|
||||
Node: ExException176993
|
||||
Node: ExTime177447
|
||||
Node: ExIncBackup177906
|
||||
Node: ExRestore181378
|
||||
Node: ExRecovery182347
|
||||
Node: Files182913
|
||||
Node: Seealso184141
|
||||
Node: Legal184665
|
||||
Node: CommandIdx185587
|
||||
Node: ConceptIdx199812
|
||||
Node: Scripting160007
|
||||
Node: Frontend165569
|
||||
Node: Examples166864
|
||||
Node: ExDevices168033
|
||||
Node: ExCreate168667
|
||||
Node: ExDialog169941
|
||||
Node: ExGrowing171203
|
||||
Node: ExModifying172005
|
||||
Node: ExBootable172506
|
||||
Node: ExCharset173053
|
||||
Node: ExPseudo173881
|
||||
Node: ExCdrecord174775
|
||||
Node: ExMkisofs175090
|
||||
Node: ExGrowisofs176093
|
||||
Node: ExException177217
|
||||
Node: ExTime177671
|
||||
Node: ExIncBackup178130
|
||||
Node: ExRestore181602
|
||||
Node: ExRecovery182571
|
||||
Node: Files183137
|
||||
Node: Seealso184365
|
||||
Node: Legal184889
|
||||
Node: CommandIdx185811
|
||||
Node: ConceptIdx200036
|
||||
|
||||
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 "Nov 05, 2010"
|
||||
@c man .TH XORRISO 1 "Dec 02, 2010"
|
||||
@c man .\" Please adjust this date whenever revising the manpage.
|
||||
@c man .\"
|
||||
@c man .\" Some roff macros, for reference:
|
||||
@ -4116,6 +4116,9 @@ Writing to stdout is possible only if -as "mkisofs" was among the start
|
||||
arguments or if other start arguments pointed the output drive to
|
||||
standard output.
|
||||
@*
|
||||
-print-size inhibits automatic image production at program end. This ban is
|
||||
lifted only if the pending image changes get discarded.
|
||||
@*
|
||||
Not original mkisofs options are @minus{}@minus{}quoted_path_list ,
|
||||
@minus{}@minus{}hardlinks , @minus{}@minus{}acl ,
|
||||
@minus{}@minus{}xattr , @minus{}@minus{}md5 , @minus{}@minus{}stdio_sync .
|
||||
|
@ -269,7 +269,7 @@ int main(int argc, char **argv)
|
||||
|
||||
end_sucessfully:; /* normal shutdown, including eventual -commit */
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
if(Xorriso_change_is_pending(xorriso, 0))
|
||||
if(Xorriso_change_is_pending(xorriso, 1))
|
||||
Xorriso_option_end(xorriso, 2);
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
ret= Xorriso_make_return_value(xorriso, 0);
|
||||
|
@ -250,7 +250,11 @@ struct XorrisO { /* the global context of xorriso */
|
||||
time_t isofs_st_in; /* That time point as read from "isofs.st" of the
|
||||
loaded image. */
|
||||
|
||||
int volset_change_pending; /* whether -commit would make sense */
|
||||
int volset_change_pending; /* whether -commit would make sense
|
||||
0= no change pending , 1= change pending
|
||||
2= change pending, but -as misofs -print-size
|
||||
was performed on the changed image model
|
||||
*/
|
||||
int no_volset_present; /* set to 1 on first failure */
|
||||
|
||||
struct CheckmediajoB *check_media_default;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.12.01.173750"
|
||||
#define Xorriso_timestamP "2010.12.02.063209"
|
||||
|
Loading…
Reference in New Issue
Block a user