summaryrefslogtreecommitdiff
path: root/libdiskfs/fsys-getroot.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-01-29 14:06:15 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-02-25 11:19:00 +0100
commit86e3141aaf13b1bc55d74bd6f557a62b814e944c (patch)
tree5478d2359f55b2aae2461695ea4b7bdeb50afdaf /libdiskfs/fsys-getroot.c
parent982261fec4707d0c8d0723d90d9c0e465d98aa93 (diff)
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.
Diffstat (limited to 'libdiskfs/fsys-getroot.c')
-rw-r--r--libdiskfs/fsys-getroot.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 85e11671..52122146 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -26,7 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Implement fsys_getroot as described in <hurd/fsys.defs>. */
kern_return_t
-diskfs_S_fsys_getroot (fsys_t controlport,
+diskfs_S_fsys_getroot (struct diskfs_control *pt,
mach_port_t reply,
mach_msg_type_name_t replytype,
mach_port_t dotdot,
@@ -40,8 +40,6 @@ diskfs_S_fsys_getroot (fsys_t controlport,
file_t *returned_port,
mach_msg_type_name_t *returned_port_poly)
{
- struct port_info *pt = ports_lookup_port (diskfs_port_bucket, controlport,
- diskfs_control_class);
error_t err = 0;
mode_t type;
struct protid *newpi;
@@ -55,7 +53,8 @@ diskfs_S_fsys_getroot (fsys_t controlport,
path: NULL,
};
- if (!pt)
+ if (!pt
+ || pt->pi.class != diskfs_control_class)
return EOPNOTSUPP;
flags &= O_HURD;
@@ -200,8 +199,6 @@ diskfs_S_fsys_getroot (fsys_t controlport,
pthread_mutex_unlock (&diskfs_root_node->lock);
pthread_rwlock_unlock (&diskfs_fsys_lock);
- ports_port_deref (pt);
-
drop_idvec ();
return err;