From 1b7ad5c5d601b6388f0fc871b4fa42d231c05400 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 6 Dec 2012 17:51:58 +0100 Subject: Simple implementation of statfs Initial implementation of statfs reply, just returning the filesystem type and its id. * netfs.c: Include and . (netfs_attempt_statfs): Implement. --- netfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/netfs.c b/netfs.c index a4d9f9c..c139d11 100644 --- a/netfs.c +++ b/netfs.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #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 -- cgit v1.2.3