Re: [PATCH] Re: Bugs(?) in the cdrom code
Jens Axboe (axboe@image.dk)
Wed, 29 Sep 1999 19:53:35 +0200
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/