Made burn_drive_snooze() safe for emulated drives

This commit is contained in:
Thomas Schmitt 2009-08-24 16:15:46 +00:00
parent 654d71ef07
commit b900831914
3 changed files with 4 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2009.08.24.131146" #define Cdrskin_timestamP "2009.08.24.161646"

View File

@ -539,6 +539,8 @@ int burn_drive_release_fl(struct burn_drive *d, int flag)
*/ */
int burn_drive_snooze(struct burn_drive *d, int flag) int burn_drive_snooze(struct burn_drive *d, int flag)
{ {
if (d->drive_role != 1)
return 0;
if (flag & 1) if (flag & 1)
d->start_unit(d); d->start_unit(d);
else else

View File

@ -1040,6 +1040,7 @@ int burn_drive_grab(struct burn_drive *drive, int load);
@param flag Bitfield for control purposes @param flag Bitfield for control purposes
bit0= become alert (else start snoozing) bit0= become alert (else start snoozing)
This is not mandatory to allow further drive operations This is not mandatory to allow further drive operations
@return 1= success , 0= drive role not suitable for calming
@since 0.7.0 @since 0.7.0
*/ */
int burn_drive_snooze(struct burn_drive *d, int flag); int burn_drive_snooze(struct burn_drive *d, int flag);