diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-05-09 22:19:58 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-05-09 22:19:58 +0000 |
commit | 69f16ad9f20a7f0029323c53cafaae3cf720b12a (patch) | |
tree | c2208dddfbafba9730db9b6bbc43acdb53eb9df8 /libnetfs | |
parent | 8ea4955c12375ea3bbba4dd19c3bc1f81cad5094 (diff) |
(netfs_make_protid): Use new ports interface; if it fails return zero.
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/make-protid.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libnetfs/make-protid.c b/libnetfs/make-protid.c index 102ebcaf..c92d21e4 100644 --- a/libnetfs/make-protid.c +++ b/libnetfs/make-protid.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -24,9 +24,12 @@ struct protid * netfs_make_protid (struct peropen *po, struct netcred *cred) { struct protid *pi; - - pi = ports_allocate_port (netfs_port_bucket, sizeof (struct protid), - netfs_protid_class); + + errno = ports_create_port (netfs_protid_class, netfs_port_bucket, + sizeof (struct protid, &pi)); + if (errno) + return 0; + po->refcnt++; pi->po = po; pi->credential = cred; |