char *version;
char *serial;
bool tray_open;
+ bool tray_locked;
};
static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type);
p[5] = 0xff; /* CD DA, DA accurate, RW supported,
RW corrected, C2 errors, ISRC,
UPC, Bar code */
- p[6] = 0x2d | (bdrv_is_locked(s->bs)? 2 : 0);
+ p[6] = 0x2d | (s->tray_locked ? 2 : 0);
/* Locking supported, jumper present, eject, tray */
p[7] = 0; /* no volume & mute control, no
changer */
scsi_disk_emulate_start_stop(r);
break;
case ALLOW_MEDIUM_REMOVAL:
+ s->tray_locked = req->cmd.buf[4] & 1;
bdrv_set_locked(s->bs, req->cmd.buf[4] & 1);
break;
case READ_CAPACITY_10: