summaryrefslogtreecommitdiff
path: root/rootdir.c
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-08-23 09:06:01 +0000
committerJeremie Koenig <jk@jk.fr.eu.org>2010-08-30 14:29:53 +0200
commit4deaca2ce2c4ed2c5ab53f57a7747c71126a8da7 (patch)
treeecd58a1b4cd0b80ed3b7ca838c8bb94731b2f833 /rootdir.c
parent4f40fb6fbfa95c51b6abfceffcd0e1ce80824e70 (diff)
Use a global ps_context
* proclist.c, proclist.h (proclist_create_node): Use a ps_context passed by the caller; errors are no longer possible, rename to proclist_make_node and change the signature accordingly. * rootdir.c, rootdir.h (rootdir_create_node): Likewise. * main.c (main): Create the ps_context here and pass it to root_make_node. (root_make_node): Pass it to proclist_make_node and rootdir_make_node.
Diffstat (limited to 'rootdir.c')
-rw-r--r--rootdir.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/rootdir.c b/rootdir.c
index 865342ce..8062f0d3 100644
--- a/rootdir.c
+++ b/rootdir.c
@@ -357,22 +357,15 @@ static const struct procfs_dir_entry rootdir_entries[] = {
{}
};
-error_t
-rootdir_create_node (struct node **np)
+struct node
+*rootdir_make_node (struct ps_context *pc)
{
- struct ps_context *pc;
const struct procfs_dir_entry *entries;
- error_t err;
-
- err = ps_context_create (getproc (), &pc);
- if (err)
- return err;
entries = rootdir_entries;
if (opt_fake_self < 0)
entries++;
- *np = procfs_dir_make_node (entries, pc, (void (*)(void *)) ps_context_free);
- return 0;
+ return procfs_dir_make_node (entries, pc, NULL);
}