How to figure out the file descriptor inside a driver?

Joel Sherrill joel.sherrill at
Mon Dec 15 15:01:38 UTC 2003

Carl-Johan Hansson wrote:

> I'm writing a couple of new drivers and in one of them I want to map the 
> file descriptor that I receive when I open the driver with another 
> parameter when I call ioctl(). Is there some way to figure out the file 
> descriptor when I'm inside the driver routine?
> Hope you understand the question!

Do you mean file description in the integer sense (e.g. read()) or
in the FILE * sense (e.g. fread())?
> Senaste nytt från motormarknaden

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

More information about the users mailing list