Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!milton!blake!ndsuvax!ncoverby From: ncoverby@ndsuvax.UUCP (Glen Overby) Newsgroups: comp.os.minix Subject: Re: Large Disks Summary: another application for ioctl! Message-ID: <2988@ndsuvax.UUCP> Date: 5 Oct 89 16:14:49 GMT References: <241@vsserv.scri.fsu.edu> <3491@ast.cs.vu.nl> Reply-To: ncoverby@ndsuvax.UUCP (Glen Overby) Organization: North Dakota State University, Fargo Lines: 33 In article <3491@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes: >I hadn't realized that fdisks quietly assumed 4 heads. That is probably >very dangerous nowadays. One solution is to force the number of heads >as a parameter, and give a Usage: message is not supplied. Any other ideas? yes! use ioctl to get the number of disk heads, cylinders, etc. from the wini driver. I tried implimenting this a while back, but I found out the hard way that ioctl only knows about ttys. I can't recall all the details, but I do remember that ioctl() copies it's parameters into a message, and I had trouble making all the disk geometry parameters fit. FS also knows about this (lines 12307-12315 in the Book). My feeling is that ioctl() should pass a pointer to it's i/o parameter, and the device should copy it in and out of user space. This is more work, but it's also more versatile. And it's not like ioctl's are done that many times a second. I think it would also be very useful to be able to SET the disk geometry parameters in the driver with the ioctl; I belive the RLL problem would then be a simple ioctl changing the number of sectors/track and retry timer. Thats all I had to change in the code (1.3D) for an Adaptec RLL controler> Also on my "fix" wish-list is a fdisk that knows what a DOS 16-bit FAT partition is. Right now it lists it as unknown (or something like that). >more than 4 heads, or do clones keep the partition table somewhere else >these days? Every machine I ever encountered had a pretty much standard partition table (sector 0 of the entire drive). The number of heads, etc. shouldn't have mattered. Western Digital stores all their drive parameters there... -- Glen Overby uunet!ndsuvax!ncoverby (UUCP) ncoverby@ndsuvax (Bitnet)