Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!botter!ast From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Re: Bug reading block special devices (problem solved?) Message-ID: <1730@botter.cs.vu.nl> Date: Mon, 12-Oct-87 15:04:59 EDT Article-I.D.: botter.1730 Posted: Mon Oct 12 15:04:59 1987 Date-Received: Wed, 14-Oct-87 04:47:44 EDT References: <569@louie.udel.EDU> Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 13 In article <569@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes: >I'm not sure where f_size would come from for a block special device, Block devices have sizes in MINIX, unlike UNIX. The sizes are inserted by mkfs when the file systems are made. The reason for this is that the 360K and 1.2M disk drivers are one and the same. If you insert a 360K diskette in an AT drive and ask for block 361, it hangs. As a partial attempt to solve this problem, I made special files /dev/fd0 and /dev/at0. The former has a size of 360K and the latter 1.2M. If you try to access block 361 on /dev/fd0, the file system sees that the block is beyond the maximum file size and returns EOF without even calling the driver. Andy Tanenbaum (ast@cs.vu.nl)