New API call burn_drive_release_v2()
This commit is contained in:
parent
a63fa82724
commit
5ff9e12a27
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2024.09.15.141244"
|
#define Cdrskin_timestamP "2024.09.20.162105"
|
||||||
|
@ -686,9 +686,10 @@ int burn_drive_mark_unready(struct burn_drive *d, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts A70918 : outsourced from burn_drive_release() and enhanced */
|
/* ts A70918-C40918 : outsourced from burn_drive_release() and enhanced */
|
||||||
/** @param flag bit0-2 = mode : 0=unlock , 1=unlock+eject , 2=leave locked
|
/** @param flag bit0-2 = mode : 0=unlock , 1=unlock+eject , 2=leave locked
|
||||||
bit3= do not call d->release()
|
bit3= do not calm drive and do not call d->release()
|
||||||
|
bit4= do not calm drive (@since 1.5.8)
|
||||||
*/
|
*/
|
||||||
int burn_drive_release_fl(struct burn_drive *d, int flag)
|
int burn_drive_release_fl(struct burn_drive *d, int flag)
|
||||||
{
|
{
|
||||||
@ -719,11 +720,11 @@ int burn_drive_release_fl(struct burn_drive *d, int flag)
|
|||||||
d->unlock(d);
|
d->unlock(d);
|
||||||
if ((flag & 7) == 1)
|
if ((flag & 7) == 1)
|
||||||
d->eject(d);
|
d->eject(d);
|
||||||
if (!(flag & 8)) {
|
if (!(flag & (8 | 16)))
|
||||||
burn_drive_snooze(d, 0);
|
burn_drive_snooze(d, 0);
|
||||||
|
if (!(flag & 8))
|
||||||
d->release(d);
|
d->release(d);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
d->needs_sync_cache = 0; /* just to be sure */
|
d->needs_sync_cache = 0; /* just to be sure */
|
||||||
|
|
||||||
@ -765,6 +766,14 @@ void burn_drive_release(struct burn_drive *d, int le)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* API */
|
||||||
|
/* ts C40918 */
|
||||||
|
int burn_drive_release_v2(struct burn_drive *d, int flag)
|
||||||
|
{
|
||||||
|
return burn_drive_release_fl(d, flag & 0x17);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts B11002 */
|
/* ts B11002 */
|
||||||
/* API */
|
/* API */
|
||||||
int burn_drive_re_assess(struct burn_drive *d, int flag)
|
int burn_drive_re_assess(struct burn_drive *d, int flag)
|
||||||
|
@ -1269,6 +1269,23 @@ int burn_drive_re_assess(struct burn_drive *d, int flag);
|
|||||||
void burn_drive_release(struct burn_drive *drive, int eject);
|
void burn_drive_release(struct burn_drive *drive, int eject);
|
||||||
|
|
||||||
|
|
||||||
|
/* ts C40918 */
|
||||||
|
/** Release a drive like with burn_drive_release() or burn_drive_leave_locked()
|
||||||
|
but with the additional option not to calm down the drive.
|
||||||
|
@param drive The drive to release.
|
||||||
|
@param flag Bitfield for control purposes:
|
||||||
|
bit0-2= mode
|
||||||
|
0= unlock
|
||||||
|
1= unlock+eject
|
||||||
|
2= leave locked
|
||||||
|
bit3= reserved, submit 0
|
||||||
|
bit4= do not calm drive
|
||||||
|
@return 1 means success, <=0 means failure
|
||||||
|
@since 1.5.8
|
||||||
|
*/
|
||||||
|
int burn_drive_release_v2(struct burn_drive *d, int flag);
|
||||||
|
|
||||||
|
|
||||||
/* ts A70918 */
|
/* ts A70918 */
|
||||||
/** Like burn_drive_release() but keeping the drive tray closed and its
|
/** Like burn_drive_release() but keeping the drive tray closed and its
|
||||||
eject button disabled. This physically locked drive state will last until
|
eject button disabled. This physically locked drive state will last until
|
||||||
@ -4252,7 +4269,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
|
|||||||
int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag);
|
int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag);
|
||||||
|
|
||||||
/* ts C40303 */
|
/* ts C40303 */
|
||||||
/** Like burn_get_read_capacity(), but with off_t result.
|
/** Like burn_get_read_capacity(), but with uncurbed off_t result.
|
||||||
@since 1.5.8
|
@since 1.5.8
|
||||||
*/
|
*/
|
||||||
int burn_get_read_capacity_v2(struct burn_drive *d, off_t *capacity, int flag);
|
int burn_get_read_capacity_v2(struct burn_drive *d, off_t *capacity, int flag);
|
||||||
|
@ -218,6 +218,7 @@ LIBBURN4_1.5.8 {
|
|||||||
burn_disc_get_sectors_v2;
|
burn_disc_get_sectors_v2;
|
||||||
burn_disc_track_lba_nwa_v2;
|
burn_disc_track_lba_nwa_v2;
|
||||||
burn_drive_get_status_v2;
|
burn_drive_get_status_v2;
|
||||||
|
burn_drive_release_v2;
|
||||||
burn_get_read_capacity_v2;
|
burn_get_read_capacity_v2;
|
||||||
burn_session_get_sectors_v2;
|
burn_session_get_sectors_v2;
|
||||||
burn_track_get_sectors_v2;
|
burn_track_get_sectors_v2;
|
||||||
|
Loading…
Reference in New Issue
Block a user