How to figure out the file descriptor inside a driver?

Carl-Johan Hansson cjhansson at hotmail.com
Mon Dec 15 15:44:18 UTC 2003


>>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())?

I mean in the integer number you receive when calling open() and not 
fopen(). I want to find that number in the arguments when calling (e.g 
read()) if possible.

_________________________________________________________________
Hela veckans väder  http://www.msn.se/vader




More information about the users mailing list