summaryrefslogtreecommitdiff
path: root/libmachdev/trivfs_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmachdev/trivfs_server.c')
-rw-r--r--libmachdev/trivfs_server.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c
index 6d5b3ad5..0d7fe24e 100644
--- a/libmachdev/trivfs_server.c
+++ b/libmachdev/trivfs_server.c
@@ -125,12 +125,17 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
static int
demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
{
- int ret;
- extern int device_server (mach_msg_header_t *, mach_msg_header_t *);
- extern int notify_server (mach_msg_header_t *, mach_msg_header_t *);
- ret = device_server (inp, outp) || notify_server (inp, outp)
- || trivfs_demuxer (inp, outp);
- return ret;
+ mig_routine_t routine;
+ if ((routine = device_server_routine (inp)) ||
+ (routine = notify_server_routine (inp)) ||
+ (routine = NULL, trivfs_demuxer (inp, outp)))
+ {
+ if (routine)
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
void