Index: uspace/app/df/df.c
===================================================================
--- uspace/app/df/df.c	(revision fe91f66babd983082bdd8bef5fe246fe62811619)
+++ uspace/app/df/df.c	(revision b5b5d841e02991430e1371523c988d98ab5c2786)
@@ -40,5 +40,4 @@
 #include <stdint.h>
 #include <getopt.h>
-#include <sys/statfs.h>
 #include <errno.h>
 #include <adt/list.h>
@@ -124,5 +123,5 @@
 	print_header();
 	list_foreach(mtab_list, link, mtab_ent_t, mtab_ent) {
-		if (statfs(mtab_ent->mp, &st) == 0) {
+		if (vfs_statfs_path(mtab_ent->mp, &st) == 0) {
 			print_statfs(&st, mtab_ent->fs_name, mtab_ent->mp);
 		} else {
Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision fe91f66babd983082bdd8bef5fe246fe62811619)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision b5b5d841e02991430e1371523c988d98ab5c2786)
@@ -44,5 +44,4 @@
 #include <stdio.h>
 #include <sys/stat.h>
-#include <sys/statfs.h>
 #include <sys/types.h>
 #include <ipc/services.h>
@@ -1084,5 +1083,5 @@
 
 	struct statfs stfs;
-	if (statfs(path, &stfs) == EOK)
+	if (vfs_statfs_path(path, &stfs) == EOK)
 		str_cpy(ent->fs_name, sizeof(ent->fs_name), stfs.fs_name);
 	else
@@ -1164,35 +1163,42 @@
 /** Get filesystem statistics.
  *
+ * @param file File located on the queried file system
+ * @param st Buffer for storing information
+ * @return 0 on success. On error -1 is returned and errno is set.
+ */
+int vfs_statfs(int file, struct statfs *st)
+{
+	sysarg_t rc, ret;
+	aid_t req;
+
+	async_exch_t *exch = vfs_exchange_begin();
+
+	req = async_send_1(exch, VFS_IN_STATFS, file, NULL);
+	rc = async_data_read_start(exch, (void *) st, sizeof(*st));
+
+	vfs_exchange_end(exch);
+	async_wait_for(req, &ret);
+
+	rc = (ret != EOK ? ret : rc);
+
+	return rc;
+}
+/** Get filesystem statistics.
+ *
  * @param path Mount point path
  * @param st Buffer for storing information
- * @return 0 on success. On error -1 is returned and errno is set.
- */
-int statfs(const char *path, struct statfs *st)
-{
-	int fd = vfs_lookup(path, 0);
-	if (fd < 0) {
-		errno = fd;
-		return -1;
-	}
-	
-	sysarg_t rc, ret;
-	aid_t req;
-
-	async_exch_t *exch = vfs_exchange_begin();
-
-	req = async_send_1(exch, VFS_IN_STATFS, fd, NULL);
-	rc = async_data_read_start(exch, (void *) st, sizeof(*st));
-
-	vfs_exchange_end(exch);
-	async_wait_for(req, &ret);
-	close(fd);
-
-	rc = (ret != EOK ? ret : rc);
-	if (rc != EOK) {
-		errno = rc;
-		return -1;
-	}
-
-	return 0;
+ * @return EOK on success or a negative error code otherwise.
+ */
+int vfs_statfs_path(const char *path, struct statfs *st)
+{
+	int file = vfs_lookup(path, 0);
+	if (file < 0)
+		return file;
+	
+	int rc = vfs_statfs(file, st);
+
+	close(file);
+
+	return rc; 
 }
 
Index: pace/lib/c/include/sys/statfs.h
===================================================================
--- uspace/lib/c/include/sys/statfs.h	(revision fe91f66babd983082bdd8bef5fe246fe62811619)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2013 Manuele Conti
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SYS_STATFS_H_
-#define LIBC_SYS_STATFS_H_
-
-#include <sys/types.h>
-#include <ipc/vfs.h>
-
-struct statfs { 
-	char fs_name[FS_NAME_MAXLEN + 1];
-	uint32_t f_bsize;    /* fundamental file system block size */
-	uint64_t f_blocks;   /* total data blocks in file system */
-	uint64_t f_bfree;    /* free blocks in fs */
-};
-
-extern int statfs(const char *, struct statfs *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision fe91f66babd983082bdd8bef5fe246fe62811619)
+++ uspace/lib/c/include/vfs/vfs.h	(revision b5b5d841e02991430e1371523c988d98ab5c2786)
@@ -49,4 +49,11 @@
 };
 
+struct statfs { 
+	char fs_name[FS_NAME_MAXLEN + 1];
+	uint32_t f_bsize;    /* fundamental file system block size */
+	uint64_t f_blocks;   /* total data blocks in file system */
+	uint64_t f_bfree;    /* free blocks in fs */
+};
+
 extern char *vfs_absolutize(const char *, size_t *);
 
@@ -72,4 +79,6 @@
 extern int vfs_root(void);
 extern void vfs_root_set(int);
+extern int vfs_statfs(int, struct statfs *);
+extern int vfs_statfs_path(const char *, struct statfs *);
 
 int vfs_mount(int, const char *, service_id_t, const char *, unsigned, unsigned, int *);
Index: uspace/lib/fs/libfs.c
===================================================================
--- uspace/lib/fs/libfs.c	(revision fe91f66babd983082bdd8bef5fe246fe62811619)
+++ uspace/lib/fs/libfs.c	(revision b5b5d841e02991430e1371523c988d98ab5c2786)
@@ -45,8 +45,8 @@
 #include <str.h>
 #include <sys/stat.h>
-#include <sys/statfs.h>
 #include <stdlib.h>
 #include <fibril_synch.h>
 #include <ipc/vfs.h>
+#include <vfs/vfs.h>
 
 #define on_error(rc, action) \
