New -format mode "without_spare" (for BD-RE)

This commit is contained in:
2013-06-27 12:56:20 +00:00
parent 2527b69acb
commit 9aaf2d5ad7
6 changed files with 76 additions and 53 deletions

View File

@ -1537,6 +1537,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
/* @param flag bit0= try to achieve faster formatting
bit1= use parameter size (else use default size)
bit2= do not re-aquire drive
bit5= try to disable Defect Management
bit7= by_index mode:
bit8 to bit15 contain the index of the format to use.
@return 0=failure, did not touch medium , -1=failure, altered medium
@ -1569,6 +1570,9 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
} else {
mode_flag= 4; /* format to full size */
}
if(flag & 32)
mode_flag|= 32; /* try to disable Defect Management */
burn_disc_get_profile(drive, &current_profile, current_profile_name);
if(flag&128) { /* by_index */
@ -1627,7 +1631,7 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
mode_flag|= (1<<6);
} else if(current_profile == 0x43) { /* BD-RE */
if(!(flag & 2))
if(!(flag & (2 | 32)))
mode_flag= 6; /* format to default payload size */
if(flag&1)
mode_flag|= (1<<6);