From ceb5165b022b7dd014f958e2a509d61950ed8fac Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 17 Jun 1994 00:44:25 +0000 Subject: Formerly fsys-getroot.c.~7~ --- libdiskfs/fsys-getroot.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index b146ab7c..c60e60a5 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -21,6 +21,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "priv.h" #include "fsys_S.h" +#include +#include /* Implement fsys_getroot as described in . */ kern_return_t @@ -30,7 +32,7 @@ diskfs_S_fsys_getroot (fsys_t controlport, uid_t *gids, u_int ngids, int flags, - retry_type retry, + retry_type *retry, char *retryname, file_t *returned_port, mach_msg_type_name_t *returned_port_poly) @@ -63,11 +65,14 @@ diskfs_S_fsys_getroot (fsys_t controlport, { if (error = diskfs_start_translator (diskfs_root_node, diskfs_dotdot_file)) - goto out; + { + mutex_unlock (&diskfs_root_node->lock); + return error; + } } mutex_unlock (&diskfs_root_node->lock); - error = fsys_getroot (control, uids, nuids, gids, ngids, + error = fsys_getroot (childcontrol, uids, nuids, gids, ngids, flags, retry, retryname, returned_port); if (!error && returned_port != MACH_PORT_NULL) *returned_port_poly = MACH_MSG_TYPE_MOVE_SEND; @@ -83,7 +88,7 @@ diskfs_S_fsys_getroot (fsys_t controlport, char pathbuf[diskfs_root_node->dn_stat.st_size + 1]; int amt; - error = diskfs_node_rdwr (diskfs_root_node, pathbuf, 0 + error = diskfs_node_rdwr (diskfs_root_node, pathbuf, 0, diskfs_root_node->dn_stat.st_size, 0, 0, &amt); pathbuf[amt] = '\0'; @@ -149,7 +154,7 @@ diskfs_S_fsys_getroot (fsys_t controlport, (diskfs_make_protid (diskfs_make_peropen (diskfs_root_node, flags), uids, nuids, gids, ngids))); - *result_poly = MACH_MSG_TYPE_MAKE_SEND; + *returned_port_poly = MACH_MSG_TYPE_MAKE_SEND; mutex_unlock (&diskfs_root_node->lock); -- cgit v1.2.3