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;
|
||||
|
@ -315,6 +315,26 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
||||
char* adr, int load);
|
||||
|
||||
|
||||
/** Aquire a target drive by its filesystem path resp. libburn persistent
|
||||
address. This is a modern successor of isoburn_drive_scan_and_grab().
|
||||
Wrapper for: burn_drive_scan_and_grab()
|
||||
@since 0.1.2
|
||||
@param drive_infos On success returns a one element array with the drive
|
||||
(cdrom/burner). Thus use with driveno 0 only. On failure
|
||||
the array has no valid elements at all.
|
||||
The returned array should be freed via burn_drive_info_free()
|
||||
when the drive is no longer needed.
|
||||
@param adr The persistent address of the desired drive.
|
||||
@param flag bit0= attempt to load the disc tray.
|
||||
Else: failure if not loaded.
|
||||
bit1= regard overwriteable media as blank
|
||||
|
||||
@return 1 = success , 0 = drive not found , <0 = other error
|
||||
*/
|
||||
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
|
||||
char* adr, int flag);
|
||||
|
||||
|
||||
/** Aquire a drive from the burn_drive_info[] array which was obtained by
|
||||
a previous call of burn_drive_scan().
|
||||
Wrapper for: burn_drive_grab()
|
||||
|
Reference in New Issue
Block a user