summaryrefslogtreecommitdiff
path: root/libdiskfs/fsys-getroot.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-17 00:44:25 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-17 00:44:25 +0000
commitceb5165b022b7dd014f958e2a509d61950ed8fac (patch)
tree005c2b68895a64478e3a98951b30fa4acede67dc /libdiskfs/fsys-getroot.c
parent0a71388079087effdd03d5d3a6998f46c9c06f5a (diff)
Formerly fsys-getroot.c.~7~
Diffstat (limited to 'libdiskfs/fsys-getroot.c')
-rw-r--r--libdiskfs/fsys-getroot.c15
1 files 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 <hurd/fsys.h>
+#include <fcntl.h>
/* Implement fsys_getroot as described in <hurd/fsys.defs>. */
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);