1 |
/* ftpfs interface to libnetfs |
/* ftpfs interface to libnetfs |
2 |
|
|
3 |
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. |
Copyright (C) 1997,98,99,2001 Free Software Foundation, Inc. |
4 |
Written by Miles Bader <miles@gnu.ai.mit.edu> |
Written by Miles Bader <miles@gnu.org> |
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
6 |
|
|
7 |
The GNU Hurd is free software; you can redistribute it and/or |
The GNU Hurd is free software; you can redistribute it and/or |
23 |
#include <dirent.h> |
#include <dirent.h> |
24 |
#include <string.h> |
#include <string.h> |
25 |
#include <fcntl.h> |
#include <fcntl.h> |
26 |
|
#include <unistd.h> |
27 |
#include <sys/mman.h> |
#include <sys/mman.h> |
28 |
|
|
29 |
#include <hurd/netfs.h> |
#include <hurd/netfs.h> |
181 |
? DIRENTS_CHUNK_SIZE |
? DIRENTS_CHUNK_SIZE |
182 |
: max_data_len); |
: max_data_len); |
183 |
|
|
184 |
*data = mmap (0, size, PROT_READ|PROT_WRITE, |
*data = mmap (0, size, PROT_READ|PROT_WRITE, |
185 |
MAP_ANON, 0, 0); |
MAP_ANON, 0, 0); |
186 |
err = ((void *) *data == (void *) -1) ? errno : 0; |
err = ((void *) *data == (void *) -1) ? errno : 0; |
187 |
|
|
385 |
|
|
386 |
/* This should attempt to fetch filesystem status information for the remote |
/* This should attempt to fetch filesystem status information for the remote |
387 |
filesystem, for the user CRED. */ |
filesystem, for the user CRED. */ |
388 |
error_t netfs_attempt_statfs (struct iouser *cred, struct node *node, |
error_t |
389 |
struct statfs *st) |
netfs_attempt_statfs (struct iouser *cred, struct node *node, |
390 |
|
struct statfs *st) |
391 |
{ |
{ |
392 |
return EOPNOTSUPP; |
bzero (st, sizeof *st); |
393 |
|
st->f_type = FSTYPE_FTP; |
394 |
|
st->f_fsid = getpid (); |
395 |
|
return 0; |
396 |
} |
} |
397 |
|
|
398 |
/* This should sync the entire remote filesystem. If WAIT is set, return |
/* This should sync the entire remote filesystem. If WAIT is set, return |