summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-02-28 20:49:39 +0000
committerRoland McGrath <roland@gnu.org>1999-02-28 20:49:39 +0000
commit621464f62a48c46a452a7168465aec981f548cc2 (patch)
tree4c89d25030b67b4fea5153966aaffd11071e1bb3 /libfshelp
parentcaa1666dd2eb38fbc72dab53a588401c2da90f89 (diff)
1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
* get-identity.c (fshelp_get_identity): Use ports_class_iterate.
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/get-identity.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libfshelp/get-identity.c b/libfshelp/get-identity.c
index 05d76491..51c5fb29 100644
--- a/libfshelp/get-identity.c
+++ b/libfshelp/get-identity.c
@@ -1,5 +1,5 @@
/* Helper function for io_identity
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -26,7 +26,7 @@
static struct port_class *idclass = 0;
static struct mutex idlock = MUTEX_INITIALIZER;
-struct idspec
+struct idspec
{
struct port_info pi;
ino_t fileno;
@@ -50,7 +50,7 @@ fshelp_get_identity (struct port_bucket *bucket,
error_t check_port (void *arg)
{
struct idspec *i = arg;
- if (i->pi.class == idclass && i->fileno == fileno)
+ if (i->fileno == fileno)
{
*pt = ports_get_right (i);
return 1;
@@ -64,15 +64,15 @@ fshelp_get_identity (struct port_bucket *bucket,
id_initialize ();
*pt = MACH_PORT_NULL;
-
- ports_bucket_iterate (bucket, check_port);
+
+ ports_class_iterate (idclass, check_port);
if (*pt != MACH_PORT_NULL)
{
mutex_unlock (&idlock);
return 0;
}
-
+
err = ports_create_port (idclass, bucket, sizeof (struct idspec), &i);
if (err)
{
@@ -80,11 +80,9 @@ fshelp_get_identity (struct port_bucket *bucket,
return err;
}
i->fileno = fileno;
-
+
*pt = ports_get_right (i);
ports_port_deref (i);
mutex_unlock (&idlock);
return 0;
}
-
-