summaryrefslogtreecommitdiff
path: root/ftpfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-12-29 22:11:50 +0000
committerRoland McGrath <roland@gnu.org>2001-12-29 22:11:50 +0000
commit518d4ad83de1f1d838b39d3835cbecf3a1c4b9f3 (patch)
tree4e05da6ff2af2062a46b86f5feb87d98e5ce2de1 /ftpfs
parentf71ceba53a74d1a13cfebccbee86d1c109dacacb (diff)
2001-12-29 Roland McGrath <roland@frob.com>
* netfs.c (netfs_attempt_statfs): Implement this, returning all zeros except for f_type and f_fsid.
Diffstat (limited to 'ftpfs')
-rw-r--r--ftpfs/netfs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c
index ced7310a..0bc6f5be 100644
--- a/ftpfs/netfs.c
+++ b/ftpfs/netfs.c
@@ -1,7 +1,7 @@
/* ftpfs interface to libnetfs
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1997,98,99,2001 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@
#include <dirent.h>
#include <string.h>
#include <fcntl.h>
+#include <unistd.h>
#include <sys/mman.h>
#include <hurd/netfs.h>
@@ -180,7 +181,7 @@ get_dirents (struct ftpfs_dir *dir,
? DIRENTS_CHUNK_SIZE
: max_data_len);
- *data = mmap (0, size, PROT_READ|PROT_WRITE,
+ *data = mmap (0, size, PROT_READ|PROT_WRITE,
MAP_ANON, 0, 0);
err = ((void *) *data == (void *) -1) ? errno : 0;
@@ -384,10 +385,14 @@ error_t netfs_attempt_set_size (struct iouser *cred, struct node *node,
/* This should attempt to fetch filesystem status information for the remote
filesystem, for the user CRED. */
-error_t netfs_attempt_statfs (struct iouser *cred, struct node *node,
- struct statfs *st)
+error_t
+netfs_attempt_statfs (struct iouser *cred, struct node *node,
+ struct statfs *st)
{
- return EOPNOTSUPP;
+ bzero (st, sizeof *st);
+ st->f_type = FSTYPE_FTP;
+ st->f_fsid = getpid ();
+ return 0;
}
/* This should sync the entire remote filesystem. If WAIT is set, return