cdrom_id: cd_media_toc() extend toc size to 65536
PATCH 1/1 cdrom_id: cd_media_toc() extend toc size to 65536
From: Harald Hoyer <[email protected]>
Seems like an iDRAC reports a lot of toc entries.
"For cd_media_toc() will have to be modified to handle larger tables right now it has an "unsigned char toc[2048]" but the toc can be up to 65536 bytes long . I got a TOC length of 4610 bytes, causing cd_media_toc() to fail."
https://bugzilla.redhat.com/show_bug.cgi?idf0367
--- extras/cdrom_id/cdrom_id.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
extras/cdrom_id/cdrom_id.c +1 -1
@@ -737,7 +737,7 @@ static int cd_media_toc(struct udev *udev, int fd) {struct scsi_cmd sc;unsigned char header[12 ]; -unsigned char toc[2048 ]; +unsigned char toc[65536 ];unsigned int len, i, num_tracks;unsigned char *p;int err;
Signature · 1 line
1.7.3.4
Hello Harald,
[email protected] [2011-02-24 16:57 +0100]:
Quoted 8 lines
Seems like an iDRAC reports a lot of toc entries.
"For
cd_media_toc()will have to be modified to handle larger tables right now it has an "unsigned char toc[2048]" but the toc can be up to 65536 bytes long . I got a TOC length of 4610 bytes, causingcd_media_toc()to fail."
Thanks! Pushed.
Martin
Signature · 2 lines
Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)