summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2001-01-30 23:45:32 +0000
committerMarcus Brinkmann <marcus@gnu.org>2001-01-30 23:45:32 +0000
commit0bb14d0b8d6a7b36cf0bf445dbfebfe76ed6a592 (patch)
tree64f8ef543d938e63c1ccb9ccf381223bf35cac0b /libfshelp
parent1bec8dc0fea138a7a6a1e340916d2bc66e9cdfb2 (diff)
daemons/
2001-01-17 Neal H Walfield <neal@cs.uml.edu> * console-run.c (open_console): Conform to new fshelp_start_translator semantics. init/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * init.c (open_console): Conform to new fshelp_start_translator semantics. libfshelp/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * fshelp.h: Add two new parameters to fshelp_open_fn_t: a port to the new task and a cookie. Add a new parameter, cookie, to fshelp_start_translator and fshelp_start_translator_long that will be passed to fshelp_open_fn_t. * fetch-root.c (fshelp_fetch_root): Conform to new fshelp_start_translator_long semantics. * start-translator-long.c (service_fsys_startup): Likewise. (fshelp_start_translator_long): Likewise. * start-translator.c (fshelp_start_translator): Likewise. libtreefs/ Conform to new fshelp_start_translator semantics. trans/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * pump.c (start_pfinet): Conform to new fshelp_start_translator semantics. utils/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * mount.c (do_mount): Conform to new fshelp_start_translator semantics. * settrans.c (main): Conform to new fshelp_start_translator semantics therby allowing us to print the pid of the an active translator.
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/ChangeLog14
-rw-r--r--libfshelp/fetch-root.c5
-rw-r--r--libfshelp/fshelp.h7
-rw-r--r--libfshelp/start-translator-long.c16
-rw-r--r--libfshelp/start-translator.c6
5 files changed, 33 insertions, 15 deletions
diff --git a/libfshelp/ChangeLog b/libfshelp/ChangeLog
index 15d96d53..15cbf690 100644
--- a/libfshelp/ChangeLog
+++ b/libfshelp/ChangeLog
@@ -1,3 +1,17 @@
+2001-01-17 Neal H Walfield <neal@cs.uml.edu>
+
+ * fshelp.h: Add two new parameters to fshelp_open_fn_t:
+ a port to the new task and a cookie.
+ Add a new parameter, cookie, to fshelp_start_translator and
+ fshelp_start_translator_long that will be passed to
+ fshelp_open_fn_t.
+
+ * fetch-root.c (fshelp_fetch_root): Conform to new
+ fshelp_start_translator_long semantics.
+ * start-translator-long.c (service_fsys_startup): Likewise.
+ (fshelp_start_translator_long): Likewise.
+ * start-translator.c (fshelp_start_translator): Likewise.
+
2000-03-20 Roland McGrath <roland@baalperazim.frob.com>
* delegate.c (fshelp_delegate_translation): Add const to arg type.
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 0f255bff..3ce6293c 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -84,7 +84,8 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
return ret;
}
error_t fetch_underlying (int flags, mach_port_t *underlying,
- mach_msg_type_name_t *underlying_type)
+ mach_msg_type_name_t *underlying_type,
+ task_t task, void *cookie)
{
return
(*callback2) (box->cookie, cookie, flags,
@@ -130,7 +131,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
fds[STDERR_FILENO] = reauth (getdport (STDERR_FILENO));
- err = fshelp_start_translator_long (fetch_underlying,
+ err = fshelp_start_translator_long (fetch_underlying, NULL,
argz, argz, argz_len,
fds, MACH_MSG_TYPE_COPY_SEND,
STDERR_FILENO + 1,
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 86cafdb1..81e1fadb 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -42,7 +42,8 @@
returns the node port. */
typedef error_t (*fshelp_open_fn_t) (int flags,
file_t *node,
- mach_msg_type_name_t *node_type);
+ mach_msg_type_name_t *node_type,
+ task_t, void *cookie);
/* Start a passive translator NAME with arguments ARGZ (length
ARGZ_LEN). Initialize the initports to PORTS (length PORTS_LEN),
@@ -54,7 +55,7 @@ typedef error_t (*fshelp_open_fn_t) (int flags,
task's owner to OWNER_UID (or, if OWNER_UID is -1, then clear the
new task's owner. */
error_t
-fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
+fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn, void *cookie,
char *name, char *argz, int argz_len,
mach_port_t *fds,
mach_msg_type_name_t fds_type, int fds_len,
@@ -69,7 +70,7 @@ fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
are copied from our own state, fd[2] is copied from our own stderr,
and the other fds are cleared. */
error_t
-fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
+fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, void *cookie,
char *name, char *argz, int argz_len,
int timeout, fsys_t *control);
diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c
index 15fb63cb..3647d567 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -98,9 +98,9 @@ static const mach_msg_type_t realnodeType =
translator died, and EDIED will be returned. If an error occurs, the
error code is returned, otherwise 0. */
static error_t
-service_fsys_startup (fshelp_open_fn_t underlying_open_fn,
- mach_port_t port, long timeout,
- fsys_t *control)
+service_fsys_startup (fshelp_open_fn_t underlying_open_fn, void *cookie,
+ mach_port_t port, long timeout, fsys_t *control,
+ task_t task)
{
error_t err;
union
@@ -146,7 +146,8 @@ service_fsys_startup (fshelp_open_fn_t underlying_open_fn,
reply.RetCode =
(*underlying_open_fn) (request.startup.flags,
- &reply.realnode, &realnode_type);
+ &reply.realnode, &realnode_type, task,
+ cookie);
reply.realnodeType = realnodeType;
reply.realnodeType.msgt_name = realnode_type;
@@ -176,8 +177,8 @@ service_fsys_startup (fshelp_open_fn_t underlying_open_fn,
error_t
fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
- char *name, char *argz, int argz_len,
- mach_port_t *fds,
+ void *cookie, char *name, char *argz,
+ int argz_len, mach_port_t *fds,
mach_msg_type_name_t fds_type, int fds_len,
mach_port_t *ports,
mach_msg_type_name_t ports_type, int ports_len,
@@ -276,7 +277,8 @@ fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
/* Ok, cool, we've got a running(?) program, now rendezvous with it if
possible using the startup protocol on the bootstrap port... */
- err = service_fsys_startup(underlying_open_fn, bootstrap, timeout, control);
+ err = service_fsys_startup(underlying_open_fn, cookie, bootstrap,
+ timeout, control, task);
lose:
if (!ports_moved)
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c
index 5996ac74..ba5418ec 100644
--- a/libfshelp/start-translator.c
+++ b/libfshelp/start-translator.c
@@ -25,8 +25,8 @@
error_t
fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
- char *name, char *argz, int argz_len,
- int timeout, fsys_t *control)
+ void *cookie, char *name, char *argz,
+ int argz_len, int timeout, fsys_t *control)
{
mach_port_t ports[INIT_PORT_MAX];
mach_port_t fds[STDERR_FILENO + 1];
@@ -45,7 +45,7 @@ fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
ports[INIT_PORT_AUTH] = getauth ();
fds[STDERR_FILENO] = getdport (STDERR_FILENO);
- err = fshelp_start_translator_long (underlying_open_fn,
+ err = fshelp_start_translator_long (underlying_open_fn, cookie,
name, argz, argz_len,
fds, MACH_MSG_TYPE_COPY_SEND,
STDERR_FILENO + 1,