From owner-freebsd-bugs Thu May 11 10:56:59 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA08557 for bugs-outgoing; Thu, 11 May 1995 10:56:59 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA08551 for ; Thu, 11 May 1995 10:56:55 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id KAA10636; Thu, 11 May 1995 10:56:30 -0700 From: "Rodney W. Grimes" Message-Id: <199505111756.KAA10636@gndrsh.aac.dev.com> Subject: Re: problem for reading old CD-ROM To: ohki@gssm.otsuka.tsukuba.ac.jp Date: Thu, 11 May 1995 10:56:30 -0700 (PDT) Cc: freebsd-bugs@FreeBSD.org In-Reply-To: <199505111045.TAA00285@smri01.gssm.otsuka.tsukuba.ac.jp> from "ohki@gssm.otsuka.tsukuba.ac.jp" at May 11, 95 07:45:26 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1323 Sender: bugs-owner@FreeBSD.org Precedence: bulk > > Dear folks > > I have a problem to read my old DOS CD-ROMs with FreeBSD 2.0. > > My CD-ROMs are 512-byte logical block size, > and this causes sys/scsi/cd.c to fail reading 512-byte blocks > which are not aligned on 2KB boundaries. > Beside this, routines in sys/isofs/cd9660 do not work correctly, > since my CD-ROMs has directory entries which cross 512-byte block boundaries. > > I hacked > i) sys/scsi/cd.c to allow unalinged 512-byte block I/O, > ii) sys/isofs/cd9660 routines to allow directory entries which > cross 512-byte block boundaries if its logical block size is not 2048. > This is done mainly with iso_blkatoff() routine. > I.e. if its logical block size is not 2048, > iso_blkatoff() always read one logical block with > the next 512-byte block. > > Following context diffs are patches I make. ... I am not sure, I need to go check my iso 9660 spec, but it seems to me that 512 byte logical blocks are a violation of of the spec. Changing the cd9660 code to read non-conformat cd-roms, IMHO, is an ugly hack at best. Changing block device code to do unaligned block transfers is even worse :-(. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD