summaryrefslogtreecommitdiff
path: root/libnetfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-08 09:21:38 +0000
committerRoland McGrath <roland@gnu.org>2002-05-08 09:21:38 +0000
commit8f3e9096dd29f7bc3420e4e74db624d560ab7ebd (patch)
treeabdb35f557a638ecbf6694f91cbe6b1fd7a336bb /libnetfs
parent6b1af139bf2624830573d5fbfb75b2137472a7e6 (diff)
2002-05-07 Roland McGrath <roland@frob.com>
* fsys-getroot.c (netfs_S_fsys_getroot): Fix arg type in decl. * append-std-options.c (netfs_append_std_options): Likewise.
Diffstat (limited to 'libnetfs')
-rw-r--r--libnetfs/append-std-options.c7
-rw-r--r--libnetfs/fsys-getroot.c33
2 files changed, 18 insertions, 22 deletions
diff --git a/libnetfs/append-std-options.c b/libnetfs/append-std-options.c
index 1590d930..e5d79631 100644
--- a/libnetfs/append-std-options.c
+++ b/libnetfs/append-std-options.c
@@ -1,8 +1,7 @@
/* Get standard netfs run-time options
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1995,96,2002 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This file is part of the GNU Hurd.
@@ -25,7 +24,7 @@
/* Appends to ARGZ & ARGZ_LEN '\0'-separated options describing the standard
netfs option state. */
error_t
-netfs_append_std_options (char **argz, unsigned *argz_len)
+netfs_append_std_options (char **argz, size_t *argz_len)
{
return 0;
}
diff --git a/libnetfs/fsys-getroot.c b/libnetfs/fsys-getroot.c
index 247ef62a..d3e78332 100644
--- a/libnetfs/fsys-getroot.c
+++ b/libnetfs/fsys-getroot.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/*
+ Copyright (C) 1996,97,2001,02 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -35,7 +35,7 @@ netfs_S_fsys_getroot (mach_port_t cntl,
retry_type *do_retry,
char *retry_name,
mach_port_t *retry_port,
- mach_port_t *retry_port_type)
+ mach_msg_type_name_t *retry_port_type)
{
struct port_info *pt = ports_lookup_port (netfs_port_bucket, cntl,
netfs_control_class);
@@ -52,14 +52,14 @@ netfs_S_fsys_getroot (mach_port_t cntl,
err = iohelp_create_complex_iouser (&cred, uids, nuids, gids, ngids);
if (err)
return err;
-
+
flags &= O_HURD;
-
+
mutex_lock (&netfs_root_node->lock);
err = netfs_validate_stat (netfs_root_node, cred);
if (err)
goto out;
-
+
type = netfs_root_node->nn_stat.st_mode & S_IFMT;
if (((netfs_root_node->nn_stat.st_mode & S_IPTRANS)
@@ -82,16 +82,16 @@ netfs_S_fsys_getroot (mach_port_t cntl,
/* ENOENT means translator has vanished inside fshelp_fetch_root. */
err = 0;
}
-
+
if (type == S_IFLNK && !(flags & (O_NOLINK | O_NOTRANS)))
{
char pathbuf[netfs_root_node->nn_stat.st_size + 1];
-
+
err = netfs_attempt_readlink (cred, netfs_root_node, pathbuf);
if (err)
goto out;
-
+
mutex_unlock (&netfs_root_node->lock);
iohelp_free_iouser (cred);
@@ -113,20 +113,20 @@ netfs_S_fsys_getroot (mach_port_t cntl,
return 0;
}
}
-
- if ((type == S_IFSOCK || type == S_IFBLK || type == S_IFCHR
+
+ if ((type == S_IFSOCK || type == S_IFBLK || type == S_IFCHR
|| type == S_IFIFO) && (flags & (O_READ|O_WRITE|O_EXEC)))
{
err = EOPNOTSUPP;
goto out;
}
-
+
err = netfs_check_open_permissions (cred, netfs_root_node, flags, 0);
if (err)
goto out;
-
+
flags &= ~OPENONLY_STATE_MODES;
-
+
newpi = netfs_make_protid (netfs_make_peropen (netfs_root_node, flags,
&peropen_context),
cred);
@@ -137,13 +137,10 @@ netfs_S_fsys_getroot (mach_port_t cntl,
*retry_port_type = MACH_MSG_TYPE_MAKE_SEND;
retry_name[0] = '\0';
ports_port_deref (newpi);
-
+
out:
if (err)
iohelp_free_iouser (cred);
mutex_unlock (&netfs_root_node->lock);
return err;
}
-
-
-