lkml.org 
[lkml]   [1999]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Re: Bugs(?) in the cdrom code
On Tue, Sep 28 1999, Ton Hospel wrote:
> >> --- linux/drivers/block/ide-cd.c.orig Mon Sep 27 23:34:02 1999
> >> +++ linux/drivers/block/ide-cd.c Mon Sep 27 23:34:18 1999
> >> @@ -2188,7 +2188,7 @@
> >> else
> >> return -EINVAL;
> >>
> >> - if (lba < 0 || lba >= toc->capacity)
> >> + if (lba < 0 || lba > toc->capacity)
> >> return -EINVAL;
> >>
> >> buf = (char *) kmalloc (CDROM_NBLOCKS_BUFFER*CD_FRAMESIZE_RAW,
> >
> > You are right, I'll add the patch.
> >
>
> Isn't it better to just increase toc->capacity by 1, so it DOES
> represent the "capacity" ?

The capacity _is_ the last addressable block, so the patch
is correct.

--
* Jens Axboe <axboe@image.dk>
* Linux CD-ROM Maintainer
* http://www.kernel.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.033 / U:1.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site