diff options
Diffstat (limited to 'eth-multiplexer')
| -rw-r--r-- | eth-multiplexer/Makefile | 1 | ||||
| -rw-r--r-- | eth-multiplexer/multiplexer.c | 22 |
2 files changed, 14 insertions, 9 deletions
diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index 882c3d03..fbee1ca1 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@ -25,7 +25,6 @@ MIGSTUBS = deviceServer.o notifyServer.o MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h OBJS = $(SRCS:.c=.o) $(MIGSTUBS) LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h -DIST_FILES = device.defs notify.defs HURDLIBS=ports fshelp shouldbeinlibc netfs bpf OTHERLIBS = -lpthread diff --git a/eth-multiplexer/multiplexer.c b/eth-multiplexer/multiplexer.c index c36ab787..cc0024ef 100644 --- a/eth-multiplexer/multiplexer.c +++ b/eth-multiplexer/multiplexer.c @@ -39,6 +39,7 @@ #include <device/device.h> #include <hurd/ports.h> #include <hurd/netfs.h> +#include <version.h> #include "ethernet.h" #include "vdev.h" @@ -51,8 +52,8 @@ /* The device which the multiplexer connects to */ static char *device_file; -const char *argp_program_version = "eth-multiplexer 0.1"; -const char *argp_program_bug_address = "<bug-hurd@gnu.org>"; +const char *argp_program_version = STANDARD_HURD_VERSION (eth-multiplexer); + static const char doc[] = "Hurd multiplexer server."; static const struct argp_option options[] = { @@ -78,12 +79,17 @@ static int multiplexer_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) { - int device_server (mach_msg_header_t *, mach_msg_header_t *); - int notify_server (mach_msg_header_t *, mach_msg_header_t *); - - return (device_server (inp, outp) - || notify_server (inp, outp) - || ethernet_demuxer (inp, outp)); + mig_routine_t routine; + if ((routine = NULL, ethernet_demuxer (inp, outp)) || + (routine = device_server_routine (inp)) || + (routine = notify_server_routine (inp))) + { + if (routine) + (*routine) (inp, outp); + return TRUE; + } + else + return FALSE; } static void * |
