summaryrefslogtreecommitdiff
path: root/procfs_dir.h
diff options
context:
space:
mode:
Diffstat (limited to 'procfs_dir.h')
-rw-r--r--procfs_dir.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/procfs_dir.h b/procfs_dir.h
new file mode 100644
index 0000000..1ba45ad
--- /dev/null
+++ b/procfs_dir.h
@@ -0,0 +1,15 @@
+
+/* Each entry associates a name with a callback function for creating new
+ nodes corresponding to that entry. */
+struct procfs_dir_entry
+{
+ const char *name;
+ struct node *(*make_node)(void *dir_hook, void *entry_hook);
+ void *hook;
+};
+
+/* A simple directory is built from a table of entries. The table is
+ terminated by a null NAME pointer. */
+struct node *
+procfs_dir_make_node (const struct procfs_dir_entry *entries, void *dir_hook);
+