From de3cde140a765869737af76783988b3ae5169900 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 1 Feb 1996 16:51:53 +0000 Subject: Fix TOC size calculation: old code assing volume size here --- sys/i386/isa/mcd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/i386/isa/mcd.c') diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index 39060b1..9d6ab63 100644 --- a/sys/i386/isa/mcd.c +++ b/sys/i386/isa/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.62 1996/01/30 13:15:22 ache Exp $ + * $Id: mcd.c,v 1.63 1996/01/30 23:27:20 ache Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -1343,9 +1343,11 @@ mcd_toc_header(int unit, struct ioc_toc_header *th) if ((r = mcd_volinfo(unit)) != 0) return r; - th->len = msf2hsg(cd->volinfo.vol_msf, 0); th->starting_track = bcd2bin(cd->volinfo.trk_low); th->ending_track = bcd2bin(cd->volinfo.trk_high); + th->len = sizeof(struct ioc_toc_header) + + (th->ending_track - th->starting_track + 1) * + sizeof(struct cd_toc_entry); return 0; } -- cgit v1.1