This is a patch that in conjunction with e9687ec4ff525ae4a88314ba4ae97da770bd012f fixes the receiver lookups for the notify_port_t type.
* devnode/Makefile (MIGSFLAGS): Use mig-mutate.h. * eth-filter/Makefile: Likewise. * eth-multiplexer/Makefile: Likewise. * libmachdev/Makefile: Likewise. * devnode/mig-mutate.h: New file. * eth-filter/mig-mutate.h: Likewise. * eth-multiplexer/mig-mutate.h: Likewise. * libmachdev/mig-mutate.h: Likewise. * devnode/devnode.c: Adjust accordingly. * eth-filter/filter.c: Likewise. * eth-multiplexer/notify_impl.c: Likewise. * libmachdev/trivfs_server.c: Likewise. --- devnode/Makefile | 1 + devnode/devnode.c | 14 +++++++------- devnode/mig-mutate.h | 25 +++++++++++++++++++++++++ eth-filter/Makefile | 1 + eth-filter/filter.c | 14 +++++++------- eth-filter/mig-mutate.h | 25 +++++++++++++++++++++++++ eth-multiplexer/Makefile | 1 + eth-multiplexer/mig-mutate.h | 25 +++++++++++++++++++++++++ eth-multiplexer/notify_impl.c | 14 +++++++------- libmachdev/Makefile | 1 + libmachdev/mig-mutate.h | 25 +++++++++++++++++++++++++ libmachdev/trivfs_server.c | 14 +++++++------- 12 files changed, 132 insertions(+), 28 deletions(-) create mode 100644 devnode/mig-mutate.h create mode 100644 eth-filter/mig-mutate.h create mode 100644 eth-multiplexer/mig-mutate.h create mode 100644 libmachdev/mig-mutate.h diff --git a/devnode/Makefile b/devnode/Makefile index f452256..2c8af58 100644 --- a/devnode/Makefile +++ b/devnode/Makefile @@ -24,6 +24,7 @@ DIST_FILES = ourdevice.defs notify.defs HURDLIBS = ports trivfs fshelp shouldbeinlibc target = devnode MIGSTUBS = ourdeviceServer.o notifyServer.o +MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h OBJS = $(SRCS:.c=.o) $(MIGSTUBS) include ../Makeconf diff --git a/devnode/devnode.c b/devnode/devnode.c index 947d31b..61fc509 100644 --- a/devnode/devnode.c +++ b/devnode/devnode.c @@ -89,41 +89,41 @@ devnode_demuxer (mach_msg_header_t *inp, /* Implementation of notify interface */ kern_return_t -do_mach_notify_port_deleted (mach_port_t notify, +do_mach_notify_port_deleted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_msg_accepted (mach_port_t notify, +do_mach_notify_msg_accepted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_port_destroyed (mach_port_t notify, +do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t port) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_no_senders (mach_port_t notify, +do_mach_notify_no_senders (struct port_info *pi, mach_port_mscount_t mscount) { - return ports_do_mach_notify_no_senders (notify, mscount); + return ports_do_mach_notify_no_senders (pi, mscount); } kern_return_t -do_mach_notify_send_once (mach_port_t notify) +do_mach_notify_send_once (struct port_info *pi) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_dead_name (mach_port_t notify, +do_mach_notify_dead_name (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; diff --git a/devnode/mig-mutate.h b/devnode/mig-mutate.h new file mode 100644 index 0000000..f692236 --- /dev/null +++ b/devnode/mig-mutate.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ + +#define NOTIFY_INTRAN \ + port_info_t begin_using_port_info_port (mach_port_t) +#define NOTIFY_DESTRUCTOR \ + end_using_port_info (port_info_t) +#define NOTIFY_IMPORTS \ + import "libports/mig-decls.h"; diff --git a/eth-filter/Makefile b/eth-filter/Makefile index 16f5d73..0b22222 100644 --- a/eth-filter/Makefile +++ b/eth-filter/Makefile @@ -24,6 +24,7 @@ DIST_FILES = ourdevice.defs notify.defs HURDLIBS = ports trivfs fshelp ihash shouldbeinlibc target = eth-filter MIGSTUBS = ourdeviceServer.o notifyServer.o +MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h OBJS = $(SRCS:.c=.o) $(MIGSTUBS) include ../Makeconf diff --git a/eth-filter/filter.c b/eth-filter/filter.c index d2b1e39..f3d58dd 100644 --- a/eth-filter/filter.c +++ b/eth-filter/filter.c @@ -234,42 +234,42 @@ ethernet_demuxer (mach_msg_header_t *inp, /* Implementation of notify interface */ kern_return_t -do_mach_notify_port_deleted (mach_port_t notify, +do_mach_notify_port_deleted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_msg_accepted (mach_port_t notify, +do_mach_notify_msg_accepted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_port_destroyed (mach_port_t notify, +do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t port) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_no_senders (mach_port_t notify, +do_mach_notify_no_senders (struct port_info *pi, mach_port_mscount_t mscount) { debug ("do_mach_notify_no_senders is called\n"); - return ports_do_mach_notify_no_senders (notify, mscount); + return ports_do_mach_notify_no_senders (pi, mscount); } kern_return_t -do_mach_notify_send_once (mach_port_t notify) +do_mach_notify_send_once (struct port_info *pi) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_dead_name (mach_port_t notify, +do_mach_notify_dead_name (struct port_info *pi, mach_port_t name) { struct proxy *proxy; diff --git a/eth-filter/mig-mutate.h b/eth-filter/mig-mutate.h new file mode 100644 index 0000000..f692236 --- /dev/null +++ b/eth-filter/mig-mutate.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ + +#define NOTIFY_INTRAN \ + port_info_t begin_using_port_info_port (mach_port_t) +#define NOTIFY_DESTRUCTOR \ + end_using_port_info (port_info_t) +#define NOTIFY_IMPORTS \ + import "libports/mig-decls.h"; diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index a96619c..15d05a6 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@ -22,6 +22,7 @@ target = eth-multiplexer #CFLAGS += -DDEBUG SRCS = ethernet.c vdev.c multiplexer.c dev_stat.c netfs_impl.c notify_impl.c device_impl.c demuxer.c MIGSTUBS = ourdeviceServer.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 = ourdevice.defs notify.defs diff --git a/eth-multiplexer/mig-mutate.h b/eth-multiplexer/mig-mutate.h new file mode 100644 index 0000000..f692236 --- /dev/null +++ b/eth-multiplexer/mig-mutate.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ + +#define NOTIFY_INTRAN \ + port_info_t begin_using_port_info_port (mach_port_t) +#define NOTIFY_DESTRUCTOR \ + end_using_port_info (port_info_t) +#define NOTIFY_IMPORTS \ + import "libports/mig-decls.h"; diff --git a/eth-multiplexer/notify_impl.c b/eth-multiplexer/notify_impl.c index 33725bb..947069f 100644 --- a/eth-multiplexer/notify_impl.c +++ b/eth-multiplexer/notify_impl.c @@ -25,41 +25,41 @@ /* Implementation of notify interface */ kern_return_t -do_mach_notify_port_deleted (mach_port_t notify, +do_mach_notify_port_deleted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_msg_accepted (mach_port_t notify, +do_mach_notify_msg_accepted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_port_destroyed (mach_port_t notify, +do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t port) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_no_senders (mach_port_t notify, +do_mach_notify_no_senders (struct port_info *pi, mach_port_mscount_t mscount) { - return ports_do_mach_notify_no_senders (notify, mscount); + return ports_do_mach_notify_no_senders (pi, mscount); } kern_return_t -do_mach_notify_send_once (mach_port_t notify) +do_mach_notify_send_once (struct port_info *pi) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_dead_name (mach_port_t notify, +do_mach_notify_dead_name (struct port_info *pi, mach_port_t name) { debug ("do_mach_notify_dead_name is called\n"); diff --git a/libmachdev/Makefile b/libmachdev/Makefile index 728fe82..e006461 100644 --- a/libmachdev/Makefile +++ b/libmachdev/Makefile @@ -28,6 +28,7 @@ installhdrs = machdev.h HURDLIBS = ports trivfs ddekit bpf OTHERLIBS = -lpthread OBJS = $(SRCS:.c=.o) $(MIGSTUBS) +MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h include ../Makeconf diff --git a/libmachdev/mig-mutate.h b/libmachdev/mig-mutate.h new file mode 100644 index 0000000..f692236 --- /dev/null +++ b/libmachdev/mig-mutate.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ + +#define NOTIFY_INTRAN \ + port_info_t begin_using_port_info_port (mach_port_t) +#define NOTIFY_DESTRUCTOR \ + end_using_port_info (port_info_t) +#define NOTIFY_IMPORTS \ + import "libports/mig-decls.h"; diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 4565c3d..6d5b3ad 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -23,41 +23,41 @@ int trivfs_cntl_nportclasses = 1; /* Implementation of notify interface */ kern_return_t -do_mach_notify_port_deleted (mach_port_t notify, +do_mach_notify_port_deleted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_msg_accepted (mach_port_t notify, +do_mach_notify_msg_accepted (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_port_destroyed (mach_port_t notify, +do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t port) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_no_senders (mach_port_t notify, +do_mach_notify_no_senders (struct port_info *pi, mach_port_mscount_t mscount) { - return ports_do_mach_notify_no_senders (notify, mscount); + return ports_do_mach_notify_no_senders (pi, mscount); } kern_return_t -do_mach_notify_send_once (mach_port_t notify) +do_mach_notify_send_once (struct port_info *pi) { return EOPNOTSUPP; } kern_return_t -do_mach_notify_dead_name (mach_port_t notify, +do_mach_notify_dead_name (struct port_info *pi, mach_port_t name) { return EOPNOTSUPP; -- 1.9.1