Bug fix: burn_disc_get_media_id() returned BD identifiers 2 chars too long
This commit is contained in:
parent
2326a36250
commit
3c6a36546a
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2015.05.25.204252"
|
#define Cdrskin_timestamP "2015.05.26.054224"
|
||||||
|
@ -4980,6 +4980,7 @@ int mmc_read_disc_structure(struct burn_drive *d,
|
|||||||
/*
|
/*
|
||||||
@param flag bit0= set bit1 in flag for burn_util_make_printable_word
|
@param flag bit0= set bit1 in flag for burn_util_make_printable_word
|
||||||
and do not append media revision
|
and do not append media revision
|
||||||
|
bit1= truncate media_code1 to 6 characters (else 8)
|
||||||
*/
|
*/
|
||||||
static int mmc_set_product_id(char *reply,
|
static int mmc_set_product_id(char *reply,
|
||||||
int manuf_idx, int type_idx, int rev_idx,
|
int manuf_idx, int type_idx, int rev_idx,
|
||||||
@ -4993,7 +4994,10 @@ static int mmc_set_product_id(char *reply,
|
|||||||
if (*product_id == NULL ||
|
if (*product_id == NULL ||
|
||||||
*media_code1 == NULL || *media_code2 == NULL)
|
*media_code1 == NULL || *media_code2 == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
sprintf(*media_code1, "%.8s", reply + manuf_idx);
|
if (flag & 2)
|
||||||
|
sprintf(*media_code1, "%.6s", reply + manuf_idx);
|
||||||
|
else
|
||||||
|
sprintf(*media_code1, "%.8s", reply + manuf_idx);
|
||||||
ret = burn_util_make_printable_word(media_code1,
|
ret = burn_util_make_printable_word(media_code1,
|
||||||
1 | ((flag & 1) << 1));
|
1 | ((flag & 1) << 1));
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
@ -5143,7 +5147,7 @@ int mmc_get_media_product_id(struct burn_drive *d,
|
|||||||
/* Dig out manufacturer, media type and revision */
|
/* Dig out manufacturer, media type and revision */
|
||||||
ret = mmc_set_product_id(reply, 100, 106, 111,
|
ret = mmc_set_product_id(reply, 100, 106, 111,
|
||||||
product_id, media_code1, media_code2,
|
product_id, media_code1, media_code2,
|
||||||
flag & 1);
|
2 | (flag & 1));
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ char *burn_guess_manufacturer(int prf,
|
|||||||
{"MCC", 8, "Mitsubishi Chemical Corporation"},
|
{"MCC", 8, "Mitsubishi Chemical Corporation"},
|
||||||
{"MCI", 8, "Mitsui Chemicals Inc."},
|
{"MCI", 8, "Mitsui Chemicals Inc."},
|
||||||
{"MEI", 3, "Panasonic Corporation"},
|
{"MEI", 3, "Panasonic Corporation"},
|
||||||
{"MILLENMR", 8, "Millenniata Inc."},
|
{"MILLEN", 8, "Millenniata Inc."},
|
||||||
{"MKM", 3, "Mitsubishi Kagaku Media Co."},
|
{"MKM", 3, "Mitsubishi Kagaku Media Co."},
|
||||||
{"MMC", 8, "Mitsubishi Kagaku Media Co."},
|
{"MMC", 8, "Mitsubishi Kagaku Media Co."},
|
||||||
{"MXL", 8, "Hitachi Maxell Ltd."},
|
{"MXL", 8, "Hitachi Maxell Ltd."},
|
||||||
|
Loading…
Reference in New Issue
Block a user