diff options
Diffstat (limited to 'devnode/devnode.c')
-rw-r--r-- | devnode/devnode.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/devnode/devnode.c b/devnode/devnode.c index 61fc5099..789bf513 100644 --- a/devnode/devnode.c +++ b/devnode/devnode.c @@ -35,8 +35,9 @@ #include <device/device.h> #include <hurd/trivfs.h> #include <hurd/ports.h> +#include <version.h> -#include "ourdevice_S.h" +#include "device_S.h" #include "notify_S.h" #include "util.h" @@ -48,8 +49,8 @@ static char *master_file; /* The master device port for opening the interface. */ static mach_port_t master_device; -const char *argp_program_version = "devnode 0.1"; -const char *argp_program_bug_address = "<bug-hurd@gnu.org>"; +const char *argp_program_version = STANDARD_HURD_VERSION (devnode); + static const char args_doc[] = "device"; static const char doc[] = "Hurd devnode translator."; static const struct argp_option options[] = @@ -81,10 +82,17 @@ static int devnode_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) { - extern int device_server (mach_msg_header_t *, mach_msg_header_t *); - extern int notify_server (mach_msg_header_t *, mach_msg_header_t *); - return device_server (inp, outp) || notify_server (inp, outp) - || trivfs_demuxer (inp, outp); + 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; } /* Implementation of notify interface */ |