lkml.org 
[lkml]   [2001]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 'fd' file descriptor help
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.137 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site