From 86e3141aaf13b1bc55d74bd6f557a62b814e944c Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed, 29 Jan 2014 14:06:15 +0100 Subject: libdiskfs: fix receiver lookups in fsys server functions * libdiskfs/diskfs.h (struct diskfs_control): New declaration. (diskfs_begin_using_control_port): New declaration and function. (diskfs_end_using_control_port): Likewise. * libdiskfs/fsmutations.h: Add translation functions. * libdiskfs/priv.h (control_t): New type declaration for mig. * libdiskfs/boot-start.c: Fix receiver lookups. * libdiskfs/fsys-getfile.c: Likewise. * libdiskfs/fsys-getroot.c: Likewise. * libdiskfs/fsys-goaway.c: Likewise. * libdiskfs/fsys-options.c: Likewise. * libdiskfs/fsys-syncfs.c: Likewise. --- libdiskfs/fsys-goaway.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libdiskfs/fsys-goaway.c') diff --git a/libdiskfs/fsys-goaway.c b/libdiskfs/fsys-goaway.c index 2aabce84..b9103873 100644 --- a/libdiskfs/fsys-goaway.c +++ b/libdiskfs/fsys-goaway.c @@ -25,16 +25,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Implement fsys_goaway as described in . */ error_t -diskfs_S_fsys_goaway (fsys_t controlport, +diskfs_S_fsys_goaway (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t reply_type, int flags) { - struct port_info *pt = ports_lookup_port (diskfs_port_bucket, controlport, - diskfs_control_class); error_t ret; - if (!pt) + if (!pt + || pt->pi.class != diskfs_control_class) return EOPNOTSUPP; /* XXX FSYS_GOAWAY_NOWAIT not implemented. */ @@ -48,6 +47,5 @@ diskfs_S_fsys_goaway (fsys_t controlport, exit (0); } - ports_port_deref (pt); return ret; } -- cgit v1.2.3