summaryrefslogtreecommitdiff
path: root/libdiskfs/fsys-syncfs.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-syncfs.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-syncfs.c')
-rw-r--r--libdiskfs/fsys-syncfs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libdiskfs/fsys-syncfs.c b/libdiskfs/fsys-syncfs.c
index beb8881f..4dceed7f 100644
--- a/libdiskfs/fsys-syncfs.c
+++ b/libdiskfs/fsys-syncfs.c
@@ -24,14 +24,12 @@
/* Implement fsys_syncfs as described in <hurd/fsys.defs>. */
kern_return_t
-diskfs_S_fsys_syncfs (fsys_t controlport,
+diskfs_S_fsys_syncfs (struct diskfs_control *pi,
mach_port_t reply,
mach_msg_type_name_t replytype,
int wait,
int children)
{
- struct port_info *pi = ports_lookup_port (diskfs_port_bucket, controlport,
- diskfs_control_class);
error_t
helper (struct node *np)
{
@@ -49,7 +47,8 @@ diskfs_S_fsys_syncfs (fsys_t controlport,
return 0;
}
- if (!pi)
+ if (!pi
+ || pi->pi.class != diskfs_control_class)
return EOPNOTSUPP;
pthread_rwlock_rdlock (&diskfs_fsys_lock);
@@ -67,8 +66,5 @@ diskfs_S_fsys_syncfs (fsys_t controlport,
}
pthread_rwlock_unlock (&diskfs_fsys_lock);
-
- ports_port_deref (pi);
-
return 0;
}