From 5dc5292664522e85ea4ede00f2edbfeed929eb5e Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Mon, 23 Aug 2010 00:55:29 +0000 Subject: Add an empty meminfo root file * rootdir.c: Add "meminfo", empty for now. --- rootdir.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'rootdir.c') diff --git a/rootdir.c b/rootdir.c index 79928446..17fdb93a 100644 --- a/rootdir.c +++ b/rootdir.c @@ -131,6 +131,13 @@ rootdir_gc_loadavg (void *hook, void **contents, size_t *contents_len) return *contents_len >= 0 ? 0 : ENOMEM; } +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) { @@ -188,6 +195,13 @@ static struct procfs_dir_entry rootdir_entries[] = { .cleanup_contents = procfs_cleanup_contents_with_free, }, }, + { + .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, -- cgit v1.2.3