summaryrefslogtreecommitdiff
path: root/libmachdev
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-12 12:22:11 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-12 12:22:11 +0200
commit5b5839ab88fd7b621f2fe64f838666d428b20538 (patch)
treea60890fcca5d4fb3930f8b61eb42f7989273d36c /libmachdev
parent842c229601af0d0a5cfbe11f1155d332094b580f (diff)
sync dde stuff
Diffstat (limited to 'libmachdev')
-rw-r--r--libmachdev/ds_routines.c14
-rw-r--r--libmachdev/trivfs_server.c17
2 files changed, 20 insertions, 11 deletions
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index bbf54880..0e431a33 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -360,11 +360,15 @@ void mach_device_init()
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);
- return ret;
+ mig_routine_t routine;
+ if ((routine = device_server_routine (inp)) ||
+ (routine = notify_server_routine (inp)))
+ {
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
void reg_dev_emul (struct device_emulation_ops *ops)
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