New API call isoburn_set_truncate()

This commit is contained in:
2011-03-21 11:37:03 +00:00
parent 08e112c687
commit f211456214
4 changed files with 43 additions and 3 deletions

View File

@ -808,6 +808,29 @@ int isoburn_get_msc2(struct isoburn *o,
return(1);
}
/* @param flag bit0= truncate (else do not truncate)
bit1= do not warn if call is inappropriate to drive
bit2= only set if truncation is currently enabled
*/
int isoburn_set_truncate(struct burn_drive *drive, int flag)
{
int ret;
struct isoburn *o;
ret= isoburn_find_emulator(&o, drive, 0);
if(ret < 0)
return ret;
if(o == NULL) {
if(!(flag & (2 | 4)))
isoburn_msgs_submit(o, 0x00060000,
"Drive type or role is inappropriate for truncation", 0, "WARNING", 0);
return(0);
}
if(o->truncate || !(flag & 4))
o->truncate= flag & 1;
return(1);
}
void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
{