diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-06-27 15:10:33 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-06-27 15:10:33 +0000 |
commit | 39a1c5546695f933f8479d13d87a7a86aed99000 (patch) | |
tree | 756aafed58aa2955d705707af9501886af47dcef /libtrivfs/migsupport.c | |
parent | 1fcd5f26a9b373e1a1a493601af9bb30c42080ad (diff) |
(_trivfs_begin_using_protid, _trivfs_end_using_protid,
_trivfs_begin_using_oontrol, _trivfs_end_using_control): Use new ports
interface.
Diffstat (limited to 'libtrivfs/migsupport.c')
-rw-r--r-- | libtrivfs/migsupport.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libtrivfs/migsupport.c b/libtrivfs/migsupport.c index 295efc0a..c5aeb06b 100644 --- a/libtrivfs/migsupport.c +++ b/libtrivfs/migsupport.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994 Free Software Foundation + Copyright (C) 1994, 1995 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -20,45 +20,45 @@ struct trivfs_protid * _trivfs_begin_using_protid (mach_port_t port) { - if (trivfs_protid_nporttypes > 1) + if (trivfs_protid_nportclasses > 1) { - struct port_info *pi = ports_get_port (port); + struct port_info *pi = ports_lookup_port (0, port, 0); int i; - for (i = 0; i < trivfs_protid_nporttypes; i++) - if (pi->type == trivfs_protid_porttypes[i]) + for (i = 0; i < trivfs_protid_nportclasses; i++) + if (pi->class == trivfs_protid_portclasses[i]) return (struct trivfs_protid *) pi; - ports_done_with_port ((void *)port); + ports_port_deref ((void *)port); return 0; } else - return ports_check_port_type (port, trivfs_protid_porttypes[0]); + return ports_lookup_port (0, port, trivfs_protid_portclasses[0]); } void _trivfs_end_using_protid (struct trivfs_protid *cred) { - ports_done_with_port (cred); + ports_port_deref (cred); } struct trivfs_control * _trivfs_begin_using_control (mach_port_t port) { - if (trivfs_cntl_nporttypes > 1) + if (trivfs_cntl_nportclasses > 1) { - struct port_info *pi = ports_get_port (port); + struct port_info *pi = ports_lookup_port (0, port, 0); int i; - for (i = 0; i < trivfs_cntl_nporttypes; i++) - if (pi->type == trivfs_cntl_porttypes[i]) + for (i = 0; i < trivfs_cntl_nportclasses; i++) + if (pi->class == trivfs_cntl_portclasses[i]) return (struct trivfs_control *) pi; - ports_done_with_port ((void *)port); + ports_port_deref ((void *)port); return 0; } else - return ports_check_port_type (port, trivfs_cntl_porttypes[0]); + return ports_lookup_port (0, port, trivfs_cntl_porttypes[0]); } void _trivfs_end_using_control (struct trivfs_control *cred) { - ports_done_with_port (cred); + ports_port_deref (cred); } |