NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/47676: Off-by-one error in reported CD capacity means last sector cannot be read
The following reply was made to PR kern/47676; it has been noted by GNATS.
From: Reinoud Zandijk <reinoud%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, markk%clara.co.uk@localhost
Subject: Re: kern/47676: Off-by-one error in reported CD capacity means last
sector cannot be read
Date: Thu, 21 Mar 2013 22:05:23 +0100
On Thu, Mar 21, 2013 at 05:30:10PM +0000, Michael van Elst wrote:
> Seems to be slightly more complex.
>
> read_cd_capacity(struct scsipi_periph *periph, u_int *blksize, u_long *size)
> error = read_cd_capacity(cd->sc_periph, &blksize, &size);
> error = read_cd_capacity(cd->sc_periph, &blksize, &size);
> error = read_cd_capacity(periph, &mmc_discinfo->sector_size, &last_lba);
>
> One time the caller apparently expects the last_lba value as is returned
> by the READ RECORDED CD CAPACITY command.
I'll take this PR# since its my code patch :) and yes, the result is being
used ambigiously and thats not good. I am preparing a patch to clean this up
and streamline the code again.
With regards,
Reinoud
Home |
Main Index |
Thread Index |
Old Index