diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-01-29 14:06:15 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-25 11:19:00 +0100 |
commit | 86e3141aaf13b1bc55d74bd6f557a62b814e944c (patch) | |
tree | 5478d2359f55b2aae2461695ea4b7bdeb50afdaf /libdiskfs/fsys-options.c | |
parent | 982261fec4707d0c8d0723d90d9c0e465d98aa93 (diff) | |
download | hurd-86e3141aaf13b1bc55d74bd6f557a62b814e944c.tar.gz hurd-86e3141aaf13b1bc55d74bd6f557a62b814e944c.tar.bz2 hurd-86e3141aaf13b1bc55d74bd6f557a62b814e944c.zip |
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-options.c')
-rw-r--r-- | libdiskfs/fsys-options.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libdiskfs/fsys-options.c b/libdiskfs/fsys-options.c index bb183198..b366d143 100644 --- a/libdiskfs/fsys-options.c +++ b/libdiskfs/fsys-options.c @@ -28,15 +28,13 @@ /* Implement fsys_set_options as described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_set_options (fsys_t fsys, +diskfs_S_fsys_set_options (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, char *data, mach_msg_type_number_t len, int do_children) { error_t err = 0; - struct port_info *pt = - ports_lookup_port (diskfs_port_bucket, fsys, diskfs_control_class); error_t helper (struct node *np) @@ -60,7 +58,8 @@ diskfs_S_fsys_set_options (fsys_t fsys, return error; } - if (!pt) + if (!pt + || pt->pi.class != diskfs_control_class) return EOPNOTSUPP; if (do_children) @@ -77,13 +76,12 @@ diskfs_S_fsys_set_options (fsys_t fsys, pthread_rwlock_unlock (&diskfs_fsys_lock); } - ports_port_deref (pt); return err; } /* Implement fsys_get_options as described in <hurd/fsys.defs>. */ error_t -diskfs_S_fsys_get_options (fsys_t fsys, +diskfs_S_fsys_get_options (struct diskfs_control *port, mach_port_t reply, mach_msg_type_name_t replytype, char **data, mach_msg_type_number_t *data_len) @@ -91,10 +89,9 @@ diskfs_S_fsys_get_options (fsys_t fsys, char *argz = 0; size_t argz_len = 0; error_t err; - struct port_info *port = - ports_lookup_port (diskfs_port_bucket, fsys, diskfs_control_class); - if (!port) + if (!port + || port->pi.class != diskfs_control_class) return EOPNOTSUPP; err = argz_add (&argz, &argz_len, program_invocation_name); @@ -111,6 +108,5 @@ diskfs_S_fsys_get_options (fsys_t fsys, else free (argz); - ports_port_deref (port); return err; } |