Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!cs.utexas.edu!rice!uw-beaver!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.os.minix Subject: Re: 3.5" disks, PS/2 model 50Z (long!) Message-ID: <18735@bcsaic.UUCP> Date: 9 Jan 90 21:49:39 GMT References: <7546@nigel.udel.EDU> Reply-To: paula@bcsaic.UUCP (Paul Allen) Organization: Boeing Computer Services AI Center, Seattle Lines: 42 In article <7546@nigel.udel.EDU> Peter_Van_Epp@cc.sfu.ca writes: >GWR@LINUS.UUCP writes: >>In article <18528@bcsaic.UUCP> paula@bcsaic.UUCP (Paul Allen) writes: >>> [I suggested encoding the floppy drive/media combination using three >>> bits in the minor device number, but noted potential problems at >>> boot time.] >>A good way to handle this is to add another minor device type which is > >>a "media sensitive" device useful for reading and writing formatted >>diskettes. The other minor devices corresponding to particular >>diskette formats would be useful with a diskette formatting program. >> >Another suggestion (and the rational behind it!): cause build >bootblok.s actually) to put a media identifier byte ala DOS into >the bootblok on a boot disk (for bootblok) and via mkfs (and/or >the format program when one is written) into the currently unused >boot block on all floppy media. This is fine for diskettes with file systems on them, but doesn't do anything for the case where I want to write a tarfile to /dev/at0. All floppy media do not have boot blocks. My suggestion of putting the drive/media type code in the minor device number would work, but it requires the user to specify the proper device name. gwr@linus.uucp suggested adding a media-sensitive minor device which would use a heuristic to figure out the drive/media code at run-time. In a response to gwr, I suggested that perhaps the figuring-out of media type should be done in the dev_open() routine for the floppy driver and a message could be sent to the fs informing it of the current size of the floppy device. The fs needs to know the size of the device in order to do the right thing when access beyond the end of a floppy is attempted. Currently, the floppy has a null dev_open() routine. The more I think about this, the more I like it, but then I'm not a Unix internals wizard. I would appreciate comments. (Perhaps my minor-device scheme is only necessary for formatting, as gwr suggests.) In the meantime, I've got some experiments in mind and will post more when I learn something. Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!bcsaic!pallen