New bit1 with API call Xorriso_change_is_pending() issues a note if return is 0 and indev and outdev point to different drives
This commit is contained in:
@ -995,12 +995,32 @@ int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume,
|
||||
|
||||
|
||||
/* @param flag bit0= do not return 1 on volset_change_pending != 1
|
||||
bit1= issue NOTE if return is 0,
|
||||
indev and outdev point to different drives,
|
||||
and no write run or size run has happened
|
||||
*/
|
||||
int Xorriso_change_is_pending(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if(flag & 1)
|
||||
return(xorriso->volset_change_pending == 1);
|
||||
return(!!xorriso->volset_change_pending);
|
||||
ret= (xorriso->volset_change_pending == 1);
|
||||
else
|
||||
ret= !!xorriso->volset_change_pending;
|
||||
|
||||
if((flag & 2) && xorriso->volset_change_pending == 0 &&
|
||||
xorriso->commit_attempts <= 0 &&
|
||||
xorriso->print_size_attempts <= 0 &&
|
||||
xorriso->write_session_counter <= 0 &&
|
||||
xorriso->print_size_counter <= 0) {
|
||||
if(xorriso->indev[0] != 0 && xorriso->outdev[0] != 0 &&
|
||||
strcmp(xorriso->indev, xorriso->outdev) != 0) {
|
||||
Xorriso_msgs_submit(xorriso, 0,
|
||||
"-indev and -outdev differ. But no pending image modifications.",
|
||||
0, "NOTE", 0);
|
||||
}
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user