diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2012-12-06 17:51:58 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2012-12-06 17:51:58 +0100 |
commit | 1b7ad5c5d601b6388f0fc871b4fa42d231c05400 (patch) | |
tree | 36cb2efc110e09832517b20d687467c3de67b877 | |
parent | 9828a0bb4c6e69f401738013e4adfb4da95afc03 (diff) | |
download | hurd-1b7ad5c5d601b6388f0fc871b4fa42d231c05400.tar.gz hurd-1b7ad5c5d601b6388f0fc871b4fa42d231c05400.tar.bz2 hurd-1b7ad5c5d601b6388f0fc871b4fa42d231c05400.zip |
Simple implementation of statfs
Initial implementation of statfs reply, just returning the filesystem type and its id.
* netfs.c: Include <sys/statvfs.h> and <unistd.h>.
(netfs_attempt_statfs): Implement.
-rw-r--r-- | netfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -23,6 +23,8 @@ #include <mach/vm_param.h> #include <dirent.h> #include <fcntl.h> +#include <sys/statvfs.h> +#include <unistd.h> #include "procfs.h" #define PROCFS_SERVER_NAME "procfs" @@ -347,7 +349,10 @@ error_t netfs_attempt_set_size (struct iouser *cred, struct node *np, error_t netfs_attempt_statfs (struct iouser *cred, struct node *np, fsys_statfsbuf_t *st) { - return ENOSYS; + memset (st, 0, sizeof *st); + st->f_type = FSTYPE_PROC; + st->f_fsid = getpid (); + return 0; } /* The user must define this function. This should sync the locked |