From: P D H (pdh@netcom.com)
Date: 05/30/93


From: pdh@netcom.com (P D H)
Subject: Re: how to get floppy parameters
Date: Mon, 31 May 1993 02:38:10 GMT

almesber@nessie.cs.id.ethz.ch (Werner Almesberger) writes:

>In article <pdhC7Jw1v.KEE@netcom.com> pdh@netcom.com (P D H) writes:
>> How can I open the drive without the driver attempting to do some I/O.
>
>Yes, there's a "cheat mode" used by setfdprm, fdformat, etc.:
>
>fd = open(name,3)
> ^___ open with no intention to access it
>
>This gives you a file handle that you can't read or write, but that
>accepts ioctls. (Note: this is - of course - totally non-standard.)

Non-standard in what domain? UNIX? If this is going to be a feature that
remains in LINUX (and I do not want to use it if it will not remain) then
why not give it a symbolic name? Perhaps "_O_NOIO".

>> BTW, why does it need to do any I/O anyway just for an open?
>
>It has to start the motor in order to get the "media change" signal.
>This is used to invalidate any buffers that may contain old data.

What if I flush the buffers ahead of time with FDFLUSH ioctl?

-- 
/***********************************************************************\
| Phil Howard  ---  KA9WGN  ---  pdh@netcom.com   |   "The problem with |
| depending on government is that you cannot depend on it" - Tony Brown |
\***********************************************************************/