Xref: utzoo comp.unix.ultrix:7491 comp.unix.misc:1499 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!ub4b!kulcs!info-sparc1.info.ucl.ac.be!fynu.ucl.ac.be!nina From: Ninane@fynu.ucl.ac.be (Alain Ninane - FYNU) Newsgroups: comp.unix.ultrix,comp.unix.misc Subject: How to get device information from a file descriptor ? Keywords: UNIX - devices - file descriptor Message-ID: <1991Jun3.104948.20582@info-sparc1.info.ucl.ac.be> Date: 3 Jun 91 10:49:48 GMT Sender: news@info-sparc1.info.ucl.ac.be (News Administrator) Followup-To: comp.unix.ultrix Organization: University of Louvain (LLN) - Nuclear Physics Dept. Lines: 13 Originator: nina@fynu3.fynu.ucl.ac.be Nntp-Posting-Host: 130.104.3.7 Dear all of you, Given a valid file descriptor [from an open(2) call], is there a standard way to know whether or not this fd points to a specific special file/device (major number only) ? I'm particularely interrested to detect: /dev/[n]rst*, /dev/[n]rmt* I'm looking for a non-string(3) operation on the device name. As I guess this is OS dependent ... I'm using Ultrix 4.1 and SUNOS 4.1 Thank you very much, Alain. -- Dr. Alain H. Ninane, University of Louvain, Nuclear Physics Dept. Ch. du Cyclotron, 2 - B-1348 Louvain-la-Neuve, BELGIUM Tel: +32-10-47.32.73, Fax: +32-10-45.21.83, Internet: Ninane@fynu.ucl.ac.be