Commit 65fdba88 authored by Thomas Schmitt's avatar Thomas Schmitt

No -rollback in -as mkisofs -print-size. New flag in Xorriso_change_is_pending.

parent 8ad6bff3
......@@ -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
*/
......
No preview for this file type
......@@ -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;
......
#define Xorriso_timestamP "2010.12.01.173750"
#define Xorriso_timestamP "2010.12.02.063209"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment