From 890f987c15029d7e29f7deea0bba0b8d4ecaeaeb Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 16 Jul 2013 10:51:22 +0200 Subject: Add the necessary infrastructure to serve passive translators * netfs.c (netfs_get_translator): New function. * procfs.c (procfs_get_translator): Likewise. * procfs.h (struct procfs_node_ops): New field get_translator. (procfs_get_translator): New function declaration. --- procfs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'procfs.h') diff --git a/procfs.h b/procfs.h index 64782ec..d04bbad 100644 --- a/procfs.h +++ b/procfs.h @@ -51,6 +51,9 @@ struct procfs_node_ops /* Destroy this node. */ void (*cleanup) (void *hook); + + /* Get the passive translator record. */ + error_t (*get_translator) (void *hook, char **argz, size_t *argz_len); }; /* These helper functions can be used as procfs_node_ops.cleanup_contents. */ @@ -91,3 +94,6 @@ error_t procfs_get_contents (struct node *np, char **data, ssize_t *data_len); error_t procfs_lookup (struct node *np, const char *name, struct node **npp); void procfs_cleanup (struct node *np); +/* Get the passive translator record if any. */ +error_t procfs_get_translator (struct node *np, char **argz, size_t *argz_len); + -- cgit v1.2.3