Improved workaround for missing mode page 2A
This commit is contained in:
parent
2408fe77ab
commit
a1e5666150
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2014.02.13.205358"
|
#define Cdrskin_timestamP "2014.02.14.200129"
|
||||||
|
@ -1221,12 +1221,7 @@ static void strip_spaces(char *str)
|
|||||||
static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
|
static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
|
||||||
{
|
{
|
||||||
struct burn_scsi_inquiry_data *id;
|
struct burn_scsi_inquiry_data *id;
|
||||||
int i;
|
int i, profile;
|
||||||
/* For faking CD recording capability of unavailable mode page 0x2A */
|
|
||||||
static int writer_profiles[] = {
|
|
||||||
0x09, 0x0a, 0x11, 0x12, 0x13, 0x14, 0x15, 0x1a, 0x1b, 0x2b,
|
|
||||||
0x41, 0x42, 0x43, 0x00
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ts A61007 : now prevented in enumerate_common() */
|
/* ts A61007 : now prevented in enumerate_common() */
|
||||||
#if 0
|
#if 0
|
||||||
@ -1266,13 +1261,20 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
|
|||||||
out->read_dvdrom = out->read_cdr = out->read_cdrw = 0;
|
out->read_dvdrom = out->read_cdr = out->read_cdrw = 0;
|
||||||
out->write_dvdram = out->write_dvdr = out->write_cdr = 0;
|
out->write_dvdram = out->write_dvdr = out->write_cdr = 0;
|
||||||
out->write_cdrw = out->write_simulate = out->c2_errors = 0;
|
out->write_cdrw = out->write_simulate = out->c2_errors = 0;
|
||||||
/* If the drive reported a writer profile, attribute CD-R */
|
for (i = 0; i < d->num_profiles; i++) {
|
||||||
for (i = 0; writer_profiles[i] != 0; i++)
|
profile = (d->all_profiles[i * 4] << 8) |
|
||||||
if (writer_profiles[i] == d->current_profile) {
|
d->all_profiles[i * 4 + 1];
|
||||||
out->write_cdr = 1;
|
if (profile == 0x09)
|
||||||
break;
|
out->write_cdr = out->read_cdr = 1;
|
||||||
|
else if (profile == 0x0a)
|
||||||
|
out->write_cdrw = out->read_cdrw = 1;
|
||||||
|
else if (profile == 0x10)
|
||||||
|
out->read_dvdrom = 1;
|
||||||
|
else if (profile == 0x11)
|
||||||
|
out->write_dvdr = out->read_dvdr = 1;
|
||||||
|
else if (profile == 0x12)
|
||||||
|
out->write_dvdram = out->read_dvdram = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out->drive = d;
|
out->drive = d;
|
||||||
|
Loading…
Reference in New Issue
Block a user