diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-12 12:22:11 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-12 12:22:11 +0200 |
commit | 5b5839ab88fd7b621f2fe64f838666d428b20538 (patch) | |
tree | a60890fcca5d4fb3930f8b61eb42f7989273d36c /devnode | |
parent | 842c229601af0d0a5cfbe11f1155d332094b580f (diff) |
sync dde stuff
Diffstat (limited to 'devnode')
-rw-r--r-- | devnode/Makefile | 6 | ||||
-rw-r--r-- | devnode/devnode.c | 22 |
2 files changed, 16 insertions, 12 deletions
diff --git a/devnode/Makefile b/devnode/Makefile index 2c8af58d..d9a9c23c 100644 --- a/devnode/Makefile +++ b/devnode/Makefile @@ -20,14 +20,10 @@ makemode := server SRCS = devnode.c LCLHDRS = util.h -DIST_FILES = ourdevice.defs notify.defs HURDLIBS = ports trivfs fshelp shouldbeinlibc target = devnode -MIGSTUBS = ourdeviceServer.o notifyServer.o +MIGSTUBS = deviceServer.o notifyServer.o MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h OBJS = $(SRCS:.c=.o) $(MIGSTUBS) include ../Makeconf - -ourdevice.defs: device.defs - $(CPP) $(CPPFLAGS) -x c $< | sed -e '/out[ ]*device[ ]*:[ ]*device_t/s/device_t/mach_port_send_t/' > $@ 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 */ |