From 69f16ad9f20a7f0029323c53cafaae3cf720b12a Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 9 May 1996 22:19:58 +0000 Subject: (netfs_make_protid): Use new ports interface; if it fails return zero. --- libnetfs/make-protid.c | 11 +++++++---- 1 file 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; -- cgit v1.2.3