summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-08-23 00:55:29 +0000
committerJeremie Koenig <jk@jk.fr.eu.org>2010-08-30 14:29:50 +0200
commit5dc5292664522e85ea4ede00f2edbfeed929eb5e (patch)
tree9717d3391d8aea676d2191159e9f05b5deee9c79
parent6e84b8c1182013691d3629bfc08e49f81b662a2d (diff)
Add an empty meminfo root file
* rootdir.c: Add "meminfo", empty for now.
-rw-r--r--rootdir.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/rootdir.c b/rootdir.c
index 79928446..17fdb93a 100644
--- a/rootdir.c
+++ b/rootdir.c
@@ -132,6 +132,13 @@ rootdir_gc_loadavg (void *hook, void **contents, size_t *contents_len)
}
static error_t
+rootdir_gc_empty (void *hook, void **contents, size_t *contents_len)
+{
+ *contents_len = 0;
+ return 0;
+}
+
+static error_t
rootdir_gc_fakeself (void *hook, void **contents, size_t *contents_len)
{
*contents = "1";
@@ -189,6 +196,13 @@ static struct procfs_dir_entry rootdir_entries[] = {
},
},
{
+ .name = "meminfo",
+ .make_node = rootdir_file_make_node,
+ .hook = & (struct procfs_node_ops) {
+ .get_contents = rootdir_gc_empty,
+ },
+ },
+ {
.name = "self",
.make_node = rootdir_symlink_make_node,
.hook = & (struct procfs_node_ops) {