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. --- netfs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'netfs.c') diff --git a/netfs.c b/netfs.c index c139d11..276c57c 100644 --- a/netfs.c +++ b/netfs.c @@ -230,6 +230,17 @@ void netfs_node_norefs (struct node *np) pthread_spin_lock (&netfs_node_refcnt_lock); } +/* The user may define this function (but should define it together + with netfs_set_translator). For locked node NODE with S_IPTRANS + set in its mode, look up the name of its translator. Store the + name into newly malloced storage, and return it in *ARGZ; set + *ARGZ_LEN to the total length. */ +error_t netfs_get_translator (struct node *np, char **argz, + size_t *argz_len) +{ + return procfs_get_translator (np, argz, argz_len); +} + /* Libnetfs callbacks managed with libfshelp. */ -- cgit v1.2.3