diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-18 20:44:54 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:14:49 +0200 |
commit | 56d301e212ac1964223cff8ef9c34889cb1a6e75 (patch) | |
tree | 49d27b7945c840205ef0a906fd7cc3cb25697020 /procfs.c | |
parent | 2fb5b93b4cd56fd68b525371ba63b0933b61d03a (diff) | |
download | hurd-56d301e212ac1964223cff8ef9c34889cb1a6e75.tar.gz hurd-56d301e212ac1964223cff8ef9c34889cb1a6e75.tar.bz2 hurd-56d301e212ac1964223cff8ef9c34889cb1a6e75.zip |
Fuse the proclist into the root node
* dircat.c, dircat.h: New files, merge directories.
* Makefile: Add the dircat module.
* main.c: Use dircat to merge the proclist into the root
directory, instead of having it as a stand-alone one.
* procfs.h, procfs.c: Add a "refresh hack" to have the
contents of the root directory recreated on each request.
* proclist.c (proclist_make_node): Enable the hack in question.
Diffstat (limited to 'procfs.c')
-rw-r--r-- | procfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -66,6 +66,14 @@ fail: error_t procfs_get_contents (struct node *np, void **data, size_t *data_len) { + if (np->nn->ops->enable_refresh_hack_and_break_readdir && np->nn->contents) + { + if (np->nn->ops->cleanup_contents) + np->nn->ops->cleanup_contents (np->nn->hook, np->nn->contents, + np->nn->contents_len); + np->nn->contents = NULL; + } + if (! np->nn->contents && np->nn->ops->get_contents) { void *contents; |