Subject: Re: device names

From: [email-masked] (Werner Almesberger)
Date: Tue, 7 Apr 1992 12:32:13 +0000

Paul Richards <[email-masked]> writes:
> It obviously isn't necessary to have different device names since DOS
> deals with this perfectly well and if DOS can do it we can certainly get
> Linux to do it. Of course, someone will have to enlighten us as to how
> DOS does it?

Step 1: DOS finds out what density it has to use to read the first track.
Linux could do that too.  Step 2: DOS reads some sectors that describe the
remaining disk parameters (cylinders, sectors/track, single/double sided,
etc.). Because Linux does not keep such magic sectors on the disk, it has
to have other ways to determine those parameters.

> Are we really going to continue writing DOS format floppies from
> within Linux? For that matter do we need floppies apart from backing up?

It doesn't matter what we actually do with the disks. The large number of
different physical formats will always be problem. There are at least four
common physically different types of floppies (360k, 1.2M, 720k and 1.44M)
and there are much more confusing formats (i.e. single-sided ones) that DOS'
FORMAT will happily create.

> As an actual proposal. We can keep simple names by makinf the driver try
> the most common density first. If an error occurs then try another one
> and so on. If none of them work then report an error. Not ideal but it
> does show its possible. Someone must know what DOS does?

That sounds good. We'd have to have different devices for 3.5" and 5.25"
disks, the 5.25"/720k format would not be supported and there might be
problems when new formats become widely used. There might be an ioctl to
tell the driver about other, 'non-standard' formats. How about this:

   /dev/fd0.5	/dev/fd1.5	# 5.25", drive A: and B:
   /dev/fd0.3	/dev/fd1.3	# 3.5", drive A: and B:

For most practical purposes, this would avoid the need to make non-
obvious decisions about the floppy format.

- Werner

-- 
   _________________________________________________________________________
  / Werner Almesberger, ETH Zuerich, CH      [email-masked] /
 / IFW A44  Tel. +41 1 254 7213                 [email-masked] /
/_BITNET:_ALMESBER@CZHETH5A__HEPNET/CHADNET:_[20579::]57414::ALMESBERGER_/

---

From: [email-masked] (Bruce Varney)
Date: Tue, 7 Apr 92 9:56:07 EST

In the unforgettable words of  Werner Almesberger:
->
->That sounds good. We'd have to have different devices for 3.5" and 5.25"
->disks, the 5.25"/720k format would not be supported and there might be
->problems when new formats become widely used. There might be an ioctl to
->tell the driver about other, 'non-standard' formats. How about this:
->
->   /dev/fd0.5	/dev/fd1.5	# 5.25", drive A: and B:
->   /dev/fd0.3	/dev/fd1.3	# 3.5", drive A: and B:
->

		This exactly what I think we should avoid!
Why do you need /dev/fd0.5 and /dev/fd0.3?? Do you have a 3.5" drive and
a 5.25" drive that are both assigned as drive 0???? Of course not! The
driver will know what to do with the drive based on the major an minor
numbers. The driver DOESN'T CARE WHAT THE NAME IS!! If I had a device named
/dev/gribble, and assign it the appropriate major and minor to be a 
high deensity 3.5" drive in slot 0, it should work just fine.

			Bruce

---

From: [email-masked] (Michael K. Johnson)
Date: Tue, 7 Apr 92 17:04:44 CDT

From: [email-masked] (Bruce Varney)

		   This exactly what I think we should avoid!
   Why do you need /dev/fd0.5 and /dev/fd0.3?? Do you have a 3.5" drive and
   a 5.25" drive that are both assigned as drive 0???? 

Well, I agree with you wholeheartedly, but I couldn't resist pointing
out that canon, I think, (well, someone) has come out with a dual
drive which I have heard can be configured as one drive name that
handles 3.5 & 5.25.  But there are other ways of dealing with such a
problem.  BTW, if anyone knows these drives better, please correct me
-- all I've heard are rumors and seen pretty (ugly) pictures. ;-)

							Of course not! The

			   Bruce

Not trying to break your point, though...

michaelkjohnson
[email-masked]