summaryrefslogtreecommitdiff
path: root/libtrivfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-27 17:34:48 +0000
committerMiles Bader <miles@gnu.org>1996-01-27 17:34:48 +0000
commitc57754f02edf148a50ce26c8783838730b388990 (patch)
treef30f2bc113901cdcb66fe56ec61412d7cc073183 /libtrivfs
parente2120837f7309b323962aae4ca7543d9c519f0af (diff)
(trivfs_open): Use ports_create_port instead of ports_allocate_port, and
return any error.
Diffstat (limited to 'libtrivfs')
-rw-r--r--libtrivfs/open.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libtrivfs/open.c b/libtrivfs/open.c
index a9bc62fe..4303ca74 100644
--- a/libtrivfs/open.c
+++ b/libtrivfs/open.c
@@ -49,12 +49,11 @@ trivfs_open (struct trivfs_control *cntl,
err = (*trivfs_peropen_create_hook) (po);
if (!err)
{
- struct trivfs_protid *new =
- ports_allocate_port (cntl->protid_bucket,
- sizeof (struct trivfs_protid),
- cntl->protid_class);
+ struct trivfs_protid *new;
- if (new)
+ err = ports_create_port (cntl->protid_class, cntl->protid_bucket,
+ sizeof (struct trivfs_protid), &new);
+ if (! err)
{
int i;
@@ -88,8 +87,6 @@ trivfs_open (struct trivfs_control *cntl,
else
*cred = new;
}
- else
- err = ENOMEM;
}
if (err)