Centralized the inquiry whether an image change is pending

This commit is contained in:
2012-03-03 13:39:50 +00:00
parent 7c42bd8a17
commit f70299dae1
8 changed files with 22 additions and 22 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -550,7 +550,7 @@ int Xorriso_option_blank(struct XorrisO *xorriso, char *mode, int flag)
return(0);
}
if(xorriso->in_drive_handle == xorriso->out_drive_handle) {
if(xorriso->volset_change_pending) {
if(Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text,
"%s: Image changes pending. -commit or -rollback first.", cmd);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
@ -1800,7 +1800,7 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
{
int ret;
if(!xorriso->volset_change_pending) {
if(!Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text, "-commit: No image modifications pending");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
{ret= 3; goto ex;}