LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-03-2006, 05:33 AM   #1
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
system call to


Is there any similar to the FIODTYPE ioctl() to retrieve the type of device file ?
I want to know whether a particular file descriptor (opened in non-blocking mode) refers to tapes to close it so there's no danger when I open a char or block device. With FIODTYPE I have these: D_TAPE, D_MEM, D_TTY and D_DISK but only on BSD. Is there a similar call for Solaris and Linux ?
 
Old 05-03-2006, 07:15 AM   #2
primo
Member
 
Registered: Jun 2005
Posts: 542

Original Poster
Rep: Reputation: 34
I've found the way to check if it is a tape device that is portable: <sys/mtio.h> defines a MTIOCGET ioctl(). Anyway I'd like to know the generic way to obtain information about a type of device in Solaris.

Cheers, p
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using system call ej25 Programming 9 11-30-2004 11:45 AM
new system call soul2 Linux - General 1 11-03-2004 02:41 PM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
System call dami Linux - General 0 11-18-2003 11:18 AM
about system call alchen1999 Programming 10 09-01-2003 03:43 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration