home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!world!bzs
- From: bzs@ussr.std.com (Barry Shein)
- Subject: Re: Programmatic recgonition of sun floppy device
- In-Reply-To: gfong@bellahs.com's message of Thu, 10 Sep 1992 01:11:22 GMT
- Message-ID: <BZS.92Sep10215513@ussr.std.com>
- Sender: usenet@world.std.com (Mr USENET himself)
- Nntp-Posting-Host: ussr.std.com
- Organization: The World
- References: <1992Sep10.011122.23106@bellahs.com>
- Date: Fri, 11 Sep 1992 02:55:13 GMT
- Lines: 18
-
-
- From: gfong@bellahs.com (Gary Fong RD)
- > How can I programmatically determine if a given file descripter/pointer
- >belongs to a floppy device on a Sun 4/40? Detecting the file is special and
- >raw, I can do. But what function/macro will tell me it is a floppy device
- >or not?
-
- A. Do an fstat() on the fd and then stat() all the floppy devices in
- /dev and see if any match.
-
- B. Do an ioctl(fd,DKIOCINFO,xyz) and see if it's a floppy (see 'man dkio').
-
-
- --
- -Barry Shein
-
- Software Tool & Die | bzs@world.std.com | uunet!world!bzs
- Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD
-