lkml.org 
[lkml]   [2001]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to create in proc

On Tue, 3 Apr 2001, Srinivas Surabhi wrote:

> So kindly help me, what are the system calls/fuction calls to be
> used for the creation of sub-directory in /proc directory.

eg. to create a new "foo" directory in /proc/net:

new_dir = proc_mkdir("foo", proc_net);

then use the resulting dir entry to create files in this new directory:

entry = create_proc_entry("bar", 0700, new_dir);

and use remove_proc_entry() on the file entry and on the directory entry
to clean things up.

Ingo

-
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:22    [W:0.021 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site