Regarding procfs in freeBSd

Brian Fundakowski Feldman green at freebsd.org
Thu Jun 17 16:36:17 GMT 2004


On Thu, Jun 17, 2004 at 03:28:47PM +0530, ravi wrote:
> Hi,
> How to get a pointer to pfs_info structure  which points to the /proc
>  directory ?
>  
>  I mean , I want to create a proc entry under /proc .
>  But for this I need to pass an argument struct pfs_info *pi, which
>  contains a member pi_root which inturn points to the /proc's pfs_node
> 
>  
>  How to get this pi_root from pfs_info structure ?
>  Is there any global variable which points to /proc' pfs_node .?
> 
> 
> That is .. I want to create my own proc entry under /proc . How to do
> that ?

Take a look at src/sys/compat/linprocfs; I think it has everything you
are looking for.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\


More information about the freebsd-hackers mailing list