diff options
author | Miles Bader <miles@gnu.org> | 1996-01-27 16:38:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-27 16:38:55 +0000 |
commit | cc4de3548c2ff36c05c7f41f0064f89314319540 (patch) | |
tree | c88ab0428e8b907af0a0fd31494e08cf9c7e5233 /libdiskfs | |
parent | e89355fe893f89a307d1f38cc13419fafd9c6b91 (diff) |
(diskfs_S_fsys_getroot): Use diskfs_create_protid instead of
diskfs_make_protid, and deal with an error return.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/fsys-getroot.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index edc386ed..13881547 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -162,20 +162,23 @@ diskfs_S_fsys_getroot (fsys_t controlport, flags &= ~OPENONLY_STATE_MODES; - newpi = diskfs_make_protid (diskfs_make_peropen (diskfs_root_node, - flags, dotdot), - uids, nuids, gids, ngids); + error = diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, + flags, dotdot), + uids, nuids, gids, ngids, &newpi); mach_port_deallocate (mach_task_self (), dotdot); - *retry = FS_RETRY_NORMAL; - *retryname = '\0'; - *returned_port = ports_get_right (newpi); - *returned_port_poly = MACH_MSG_TYPE_MAKE_SEND; - ports_port_deref (newpi); + if (! error) + { + *retry = FS_RETRY_NORMAL; + *retryname = '\0'; + *returned_port = ports_get_right (newpi); + *returned_port_poly = MACH_MSG_TYPE_MAKE_SEND; + ports_port_deref (newpi); + } mutex_unlock (&diskfs_root_node->lock); rwlock_reader_unlock (&diskfs_fsys_lock); ports_port_deref (pt); - return 0; + return error; } |