From owner-freebsd-current Sun Apr 7 00:41:39 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA25532 for current-outgoing; Sun, 7 Apr 1996 00:41:39 -0800 (PST) Received: from eac.iafrica.com (slipper101132.iafrica.com [196.7.101.132]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA25518 for ; Sun, 7 Apr 1996 00:41:33 -0800 (PST) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id KAA00159 for current@freebsd.org; Sun, 7 Apr 1996 10:40:29 +0200 From: Robert Nordier Message-Id: <199604070840.KAA00159@eac.iafrica.com> Subject: Re: devfs questions To: current@freebsd.org Date: Sun, 7 Apr 1996 10:40:28 +0200 (SAT) In-Reply-To: <199604070123.DAA15356@uriah.heep.sax.de> from "J Wunsch" at Apr 7, 96 03:23:33 am X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sun, 7 Apr 1996, J Wunsch wrote: > As Terry Lambert wrote: > > > Frankly, other than formatting (which can damn well take a parameter > > for it), there is really no need to have media density encoded in device > > names. If DOS can deal with format detection, we can damn well do the > > same. There is no such thing as "A:" and "A.1440:", etc.. > > DOS cannot really deal with format detection. It uses its superblock > to decide about the media properties. It totally ignores non-DOS > media. > > This is no excuse for not trying to automagically detect the floppy > format, of course. I had it back in my CP/M floppy BIOS as well. Actually, MS-DOS does a fairly reasonable job of format detection. Even with a totally trashed boot sector, it can still decide on the floppy disk format by looking at the media descriptor in cluster 0 of the FAT. This involves reading multiple sectors at any of 8, 9, or 15 sectors per track, in the case of 1.2M drives, for instance. It also takes the hardware into account when resolving between disk formats with similar media descriptors (eg. both 720K and 1200K == 0xf9). It doesn't _rely_ on data contained in the boot sector or FAT to determine the underlying media, so much as (sensibly) refuse to proceed when confronted by a filesystem layout it obviously doesn't understand. Through the generic ioctl function (int 0x21 0x440d 0x0860), the DOS kernel also provides full application support for non-standard floppy disk formats, including those with a mix of varying bytes per sector and sectors per track, possibly interleaved in varying ways. (This was needed to support various copy protection schemes.) -- Robert Nordier