summaryrefslogtreecommitdiff
path: root/libnetfs
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs')
-rw-r--r--libnetfs/ChangeLog6
-rw-r--r--libnetfs/Makefile2
-rw-r--r--libnetfs/fsstubs.c10
-rw-r--r--libnetfs/io-pathconf.c69
4 files changed, 77 insertions, 10 deletions
diff --git a/libnetfs/ChangeLog b/libnetfs/ChangeLog
index 3a4ae9f8..49845de5 100644
--- a/libnetfs/ChangeLog
+++ b/libnetfs/ChangeLog
@@ -1,3 +1,9 @@
+1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * fsstubs.c (netfs_S_io_pathconf): Delete function.
+ * io-pathconf.c: New file.
+ * Makefile (IOSRCS): Add io-pathconf.c.
+
1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
* iostubs.c (netfs_S_io_map_segment): New function.
diff --git a/libnetfs/Makefile b/libnetfs/Makefile
index 28dde970..b11f1ecd 100644
--- a/libnetfs/Makefile
+++ b/libnetfs/Makefile
@@ -36,7 +36,7 @@ IOSRCS= io-read.c io-readable.c io-seek.c io-write.c io-stat.c io-async.c \
io-set-all-openmodes.c io-get-openmodes.c io-set-some-openmodes.c \
io-clear-some-openmodes.c io-mod-owner.c io-get-owner.c io-select.c \
io-get-icky-async-id.c io-reauthenticate.c io-restrict-auth.c \
- io-duplicate.c iostubs.c io-identity.c io-revoke.c
+ io-duplicate.c iostubs.c io-identity.c io-revoke.c io-pathconf.c
FSYSSRCS= fsys-syncfs.c fsys-getroot.c fsys-get-options.c fsys-set-options.c \
fsysstubs.c
diff --git a/libnetfs/fsstubs.c b/libnetfs/fsstubs.c
index d64cbc93..415c62a5 100644
--- a/libnetfs/fsstubs.c
+++ b/libnetfs/fsstubs.c
@@ -1,6 +1,6 @@
/* Unimplemented rpcs from <hurd/fs.defs>
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -52,14 +52,6 @@ netfs_S_ifsock_getsockaddr (struct protid *user,
}
error_t
-netfs_S_io_pathconf (struct protid *user,
- int name,
- int *value)
-{
- return EOPNOTSUPP;
-}
-
-error_t
netfs_S_io_server_version (struct protid *user,
char *name,
int *major,
diff --git a/libnetfs/io-pathconf.c b/libnetfs/io-pathconf.c
new file mode 100644
index 00000000..78244bcd
--- /dev/null
+++ b/libnetfs/io-pathconf.c
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Written by Thomas Bushnell, BSG.
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+
+#include <unistd.h>
+#include "netfs.h"
+#include "io_S.h"
+
+
+error_t
+netfs_S_io_pathconf (struct protid *user,
+ int name,
+ int *value)
+{
+ if (!user)
+ return EOPNOTSUPP;
+
+ switch (name)
+ {
+ case _PC_LINK_MAX:
+ case _PC_MAX_CANON:
+ case _PC_MAX_INPUT:
+ case _PC_PIPE_BUF:
+ case _PC_VDISABLE:
+ case _PC_SOCK_MAXBUF:
+ *value = -1;
+ break;
+
+ case _PC_NAME_MAX:
+ *value = 1024; /* see <hurd/hurd_types.defs> string_t */
+ break;
+
+ case _PC_CHOWN_RESTRICTED:
+ case _PC_NO_TRUNC: /* look at string_t trunc behavior in MiG */
+ *value = 1;
+ break;
+
+ case _PC_PRIO_IO:
+ case _PC_SYNC_IO:
+ case _PC_ASYNC_IO:
+ *value = 0;
+ break;
+
+ case _PC_FILESIZEBITS:
+ *value = 32;
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ return 0;
+}