mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 'fd' file descriptor help
@ 2001-12-06 21:18 Nav Mundi
  2001-12-06 21:45 ` Chris Wright
  0 siblings, 1 reply; 2+ messages in thread
From: Nav Mundi @ 2001-12-06 21:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: apiggyjj

Does anyone know what the file descriptor 'fd' pointer does?  My module makes 
a system call [sys_open] to the kernal which then returns a fd value but I 
don't know what this value means or how it gets it.  Does the fd value 
signify a specific device or is it random?  Any ideas?

Thanks for your help in advance.

-Nav

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 'fd' file descriptor help
  2001-12-06 21:18 'fd' file descriptor help Nav Mundi
@ 2001-12-06 21:45 ` Chris Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wright @ 2001-12-06 21:45 UTC (permalink / raw)
  To: Nav Mundi; +Cc: linux-kernel, apiggyjj

* Nav Mundi (nmundi@karthika.com) wrote:
> Does anyone know what the file descriptor 'fd' pointer does?  My module makes 
> a system call [sys_open] to the kernal which then returns a fd value but I 
> don't know what this value means or how it gets it.  Does the fd value 
> signify a specific device or is it random?  Any ideas?

fd is a handle for the kernel file struct representing the file you
opened.  read include/linux/file.h::fd_install() to understand where
it's put, and include/linux/file.h::fcheck() as an example of retrieving
kernel object from the handle.

cheers,
-chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-06 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06 21:18 'fd' file descriptor help Nav Mundi
2001-12-06 21:45 ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®