summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-27 16:37:20 +0000
committerMiles Bader <miles@gnu.org>1996-01-27 16:37:20 +0000
commit29b85dbc71757996e79bf14904aab21da595f1d9 (patch)
tree7a84d30f5366e9227c1fa0ca1f0e3f4325737921 /libdiskfs
parentedb4a0120b20d269084ae80ac60d5d7bc6522482 (diff)
(diskfs_S_file_invoke_translator): Use diskfs_create_protid instead of
diskfs_make_protid, and deal with an error return.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/file-inv-trans.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/libdiskfs/file-inv-trans.c b/libdiskfs/file-inv-trans.c
index f39d93d0..bbdac6ff 100644
--- a/libdiskfs/file-inv-trans.c
+++ b/libdiskfs/file-inv-trans.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994, 1995 Free Software Foundation
+ Copyright (C) 1994, 1995, 1996 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
@@ -136,20 +136,24 @@ diskfs_S_file_invoke_translator (struct protid *cred __attribute__ ((unused)),
flags &= ~OPENONLY_STATE_MODES;
-
- newpi = diskfs_make_protid (diskfs_make_peropen (np, flags,
- _diskfs_dotdot_file),
- cred->uids, cred->nuids,
- cred->gids, cred->ngids);
- *retry = FS_RETRY_NONE;
- retry_name[0] = '\0';
- *retrypt = ports_get_right (newpi);
- *retrypttype = MACH_MSG_TYPE_MAKE_SEND;
- ports_port_deref (newpi);
+
+ error = diskfs_create_protid (diskfs_make_peropen (np, flags,
+ _diskfs_dotdot_file),
+ cred->uids, cred->nuids,
+ cred->gids, cred->ngids,
+ &newpi);
+ if (! error)
+ {
+ *retry = FS_RETRY_NONE;
+ retry_name[0] = '\0';
+ *retrypt = ports_get_right (newpi);
+ *retrypttype = MACH_MSG_TYPE_MAKE_SEND;
+ ports_port_deref (newpi);
+ }
mutex_unlock (&np->lock);
- return 0;
+ return error;
#else
return EOPNOTSUPP;
#endif