linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: harald@redhat.com
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] cdrom_id: cd_media_toc() extend toc size to 65536
Date: Thu, 24 Feb 2011 15:57:05 +0000	[thread overview]
Message-ID: <1298563025-7118-1-git-send-email-harald@redhat.com> (raw)

From: Harald Hoyer <harald@redhat.com>

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(-)

diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index f0e1cbb..4a58a49 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -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;
-- 
1.7.3.4


             reply	other threads:[~2011-02-24 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 15:57 harald [this message]
2011-02-24 15:59 ` [PATCH] cdrom_id: cd_media_toc() extend toc size to 65536 Martin Pitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1298563025-7118-1-git-send-email-harald@redhat.com \
    --to=harald@redhat.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).