Date: Sun, 7 Apr 1996 10:40:28 +0200 (SAT) From: Robert Nordier <rnordier@iafrica.com> To: current@freebsd.org Subject: Re: devfs questions Message-ID: <199604070840.KAA00159@eac.iafrica.com> In-Reply-To: <199604070123.DAA15356@uriah.heep.sax.de> from "J Wunsch" at Apr 7, 96 03:23:33 am
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604070840.KAA00159>
