New option -as mkisofs emulates a narrow set of mkisofs gestures
This commit is contained in:
@ -214,6 +214,7 @@ int isoburn_libburn_req(int *major, int *minor, int *micro)
|
||||
|
||||
|
||||
/** Examine the media and sets appropriate emulation if needed.
|
||||
@param flag bit0= pretent blank on overwriteable media
|
||||
*/
|
||||
static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
||||
int flag)
|
||||
@ -237,10 +238,16 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
||||
|
||||
if(caps->start_adr) { /* set emulation to overwriteable */
|
||||
(*o)->emulation_mode= 1;
|
||||
ret= isoburn_start_emulation(*o, 0);
|
||||
if(ret<=0) {
|
||||
(*o)->emulation_mode= -1;
|
||||
goto ex;
|
||||
|
||||
if(flag&1) {
|
||||
(*o)->nwa= 0;
|
||||
(*o)->fabricated_disc_status= BURN_DISC_BLANK;
|
||||
} else {
|
||||
ret= isoburn_start_emulation(*o, 0);
|
||||
if(ret<=0) {
|
||||
(*o)->emulation_mode= -1;
|
||||
goto ex;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -263,8 +270,12 @@ ex:
|
||||
}
|
||||
|
||||
|
||||
int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
||||
char *adr, int load)
|
||||
/**
|
||||
@param flag bit0= load
|
||||
bit1= regard overwriteable media as blank
|
||||
*/
|
||||
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
|
||||
char *adr, int flag)
|
||||
{
|
||||
int ret, conv_ret, drive_grabbed= 0;
|
||||
char libburn_drive_adr[BURN_DRIVE_ADR_LEN];
|
||||
@ -279,11 +290,11 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
ret= burn_drive_scan_and_grab(drive_infos, libburn_drive_adr, load);
|
||||
ret= burn_drive_scan_and_grab(drive_infos, libburn_drive_adr, flag&1);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
drive_grabbed= 1;
|
||||
ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, 0);
|
||||
ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, !!(flag&2));
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
|
||||
@ -298,6 +309,16 @@ ex:
|
||||
}
|
||||
|
||||
|
||||
int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
||||
char *adr, int load)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret= isoburn_drive_aquire(drive_infos, adr, !!load);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_drive_grab(struct burn_drive *drive, int load)
|
||||
{
|
||||
int ret;
|
||||
|
Reference in New Issue
Block a user