aboutsummaryrefslogtreecommitdiff
path: root/libfshelp/fshelp.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-07-30 11:59:13 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-09-15 23:13:28 +0200
commit9df906ee4f34cf54c9ba253d44abb74b0ef63fe1 (patch)
treef057fa6fedbffa17b2d1a6f4e43a58f2bb612b49 /libfshelp/fshelp.h
parent2ea00da3929b9b50c3860914249b3ea7691b63c8 (diff)
downloadhurd-9df906ee4f34cf54c9ba253d44abb74b0ef63fe1.tar.gz
hurd-9df906ee4f34cf54c9ba253d44abb74b0ef63fe1.tar.bz2
hurd-9df906ee4f34cf54c9ba253d44abb74b0ef63fe1.zip
libfshelp: add translator-list.c
Add functions that maintain a list of active translators. * libfshelp/translator-list.c: New file. * libfshelp/fshelp.h: Add function declarations. * libfshelp/Makefile: Add translator-list.c, link against libihash.
Diffstat (limited to 'libfshelp/fshelp.h')
-rw-r--r--libfshelp/fshelp.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index cf39fbc4..43fbcd78 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -1,5 +1,6 @@
/* FS helper library definitions
- Copyright (C) 1994,95,96,97,98,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,97,98,99,2000,01,02,13
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -32,6 +33,36 @@
#include <maptime.h>
+/* Keeping track of active translators */
+/* These routines keep a list of active translators. They are
+ self-contained and do not require multi threading or the ports
+ library. */
+
+/* Record an active translator being bound to the given file name
+ NAME. ACTIVE is the control port of the translator. */
+error_t
+fshelp_set_active_translator (const char *name, mach_port_t active);
+
+/* Remove the active translator specified by its control port ACTIVE.
+ If there is no active translator with the given control port, this
+ does nothing. */
+error_t
+fshelp_remove_active_translator (mach_port_t active);
+
+/* This kind of function is used by fshelp_get_active_translators to
+ filter the list of translators to return. If a filter returns an
+ error for a given PATH, the translator bound to the PATH is not
+ included in the list. */
+typedef error_t (*fshelp_filter) (const char *path);
+
+/* Records the list of active translators into the argz vector
+ specified by TRANSLATORS filtered by FILTER. */
+error_t
+fshelp_get_active_translators (char **translators,
+ size_t *translators_len,
+ fshelp_filter filter);
+
+
/* Passive translator linkage */
/* These routines are self-contained and start passive translators,
returning the control port. They do not require multi threading