Index: uspace/app/bdsh/cmds/builtins/cd/cd.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -29,7 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <str.h>
 #include <errno.h>
+#include <vfs/vfs.h>
 
 #include "util.h"
@@ -51,12 +51,14 @@
 static bool previous_directory_set = false;
 
-static int chdir_and_remember(const char *new_dir) {
+static int chdir_and_remember(const char *new_dir)
+{
 
-	char *ok = getcwd(previous_directory_tmp, PATH_MAX);
-	previous_directory_valid = ok != NULL;
+	int rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX);
+	previous_directory_valid = (rc == EOK);
 	previous_directory_set = true;
 
-	if (chdir(new_dir) != 0)
-		return errno;
+	rc = vfs_cwd_set(new_dir);
+	if (rc != EOK)
+		return rc;
 
 	str_cpy(previous_directory, PATH_MAX, previous_directory_tmp);
Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -33,5 +33,4 @@
 #include <getopt.h>
 #include <str.h>
-#include <fcntl.h>
 #include <io/console.h>
 #include <io/color.h>
@@ -187,4 +186,5 @@
 	size_t offset = 0, copied_bytes = 0;
 	off64_t file_size = 0, length = 0;
+	aoff64_t pos = 0;
 
 	bool reading_stdin = dash_represents_stdin && (str_cmp(fname, "-") == 0);
@@ -195,5 +195,5 @@
 		blen = STR_BOUNDS(1);
 	} else
-		fd = open(fname, O_RDONLY);
+		fd = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ);
 	
 	if (fd < 0) {
@@ -203,12 +203,20 @@
 
 	if (NULL == (buff = (char *) malloc(blen + 1))) {
-		close(fd);
+		vfs_put(fd);
 		printf("Unable to allocate enough memory to read %s\n",
-			fname);
+		    fname);
 		return 1;
 	}
 
 	if (tail != CAT_FULL_FILE) {
-		file_size = lseek(fd, 0, SEEK_END);
+		struct stat st;
+
+		if (vfs_stat(fd, &st) != EOK) {
+			vfs_put(fd);
+			free(buff);
+			printf("Unable to vfs_stat %d\n", fd);
+			return 1;
+		}
+		file_size = st.size;
 		if (head == CAT_FULL_FILE) {
 			head = file_size;
@@ -223,7 +231,7 @@
 
 		if (tail_first) {
-			lseek(fd, (tail >= file_size) ? 0 : (file_size - tail), SEEK_SET);
+			pos = (tail >= file_size) ? 0 : (file_size - tail);
 		} else {
-			lseek(fd, ((head - tail) >= file_size) ? 0 : (head - tail), SEEK_SET);
+			pos = ((head - tail) >= file_size) ? 0 : (head - tail);
 		}
 	} else
@@ -243,5 +251,5 @@
 		}
 		
-		bytes = read(fd, buff + copied_bytes, bytes_to_read);
+		bytes = vfs_read(fd, &pos, buff + copied_bytes, bytes_to_read);
 		copied_bytes = 0;
 
@@ -279,5 +287,5 @@
 	} while (bytes > 0 && !should_quit && (count < length || length == CAT_FULL_FILE));
 
-	close(fd);
+	vfs_put(fd);
 	if (bytes == -1) {
 		printf("Error reading %s\n", fname);
Index: uspace/app/bdsh/cmds/modules/cmp/cmp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -28,5 +28,4 @@
 
 #include <errno.h>
-#include <fcntl.h>
 #include <getopt.h>
 #include <mem.h>
@@ -79,9 +78,10 @@
 	char buffer[2][CMP_BUFLEN];
 	ssize_t offset[2];
+	aoff64_t pos[2] = {};
 
 	for (int i = 0; i < 2; i++) {
-		fd[i] = open(fn[i], O_RDONLY);
+		fd[i] = vfs_lookup_open(fn[i], WALK_REGULAR, MODE_READ);
 		if (fd[i] < 0) {
-			rc = errno;
+			rc = fd[i];
 			printf("Unable to open %s\n", fn[i]);
 			goto end;
@@ -94,8 +94,9 @@
 			ssize_t size;
 			do {
-				size = read(fd[i], buffer[i] + offset[i],
+				size = vfs_read(fd[i], &pos[i],
+				    buffer[i] + offset[i],
 				    CMP_BUFLEN - offset[i]);
 				if (size < 0) {
-					rc = errno;
+					rc = size;
 					printf("Error reading from %s\n",
 					    fn[i]);
@@ -115,7 +116,7 @@
 end:
 	if (fd[0] >= 0)
-		close(fd[0]);
+		vfs_put(fd[0]);
 	if (fd[1] >= 0)
-		close(fd[1]);
+		vfs_put(fd[1]);
 	return rc;
 }
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -35,6 +35,5 @@
 #include <getopt.h>
 #include <str.h>
-#include <fcntl.h>
-#include <sys/stat.h>
+#include <vfs/vfs.h>
 #include <dirent.h>
 #include "config.h"
@@ -83,7 +82,7 @@
 	struct stat s;
 
-	int r = stat(path, &s);
-
-	if (r != 0)
+	int r = vfs_stat_path(path, &s);
+
+	if (r != EOK)
 		return TYPE_NONE;
 	else if (s.is_directory)
@@ -235,5 +234,5 @@
 			 */
 			if (force && !interactive) {
-				if (unlink(dest_path) != 0) {
+				if (vfs_unlink_path(dest_path) != EOK) {
 					printf("Unable to remove %s\n",
 					    dest_path);
@@ -246,5 +245,5 @@
 				if (overwrite) {
 					printf("Overwriting file: %s\n", dest_path);
-					if (unlink(dest_path) != 0) {
+					if (vfs_unlink_path(dest_path) != EOK) {
 						printf("Unable to remove %s\n", dest_path);
 						goto exit;
@@ -295,5 +294,6 @@
 				merge_paths(dest_path, PATH_MAX, src_dirname);
 
-				if (mkdir(dest_path, 0) != 0) {
+				if (vfs_link_path(dest_path, KIND_DIRECTORY,
+				    NULL) != EOK) {
 					printf("Unable to create "
 					    "dest directory %s\n", dest_path);
@@ -309,5 +309,6 @@
 			 * e.g. cp -r /src /data/new_dir_src
 			 */
-			if (mkdir(dest_path, 0) != 0) {
+			if (vfs_link_path(dest_path, KIND_DIRECTORY,
+			    NULL) != EOK) {
 				printf("Unable to create "
 				    "dest directory %s\n", dest_path);
@@ -341,6 +342,6 @@
 
 			/* Check if we are copying a directory into itself */
-			stat(src_dent, &src_s);
-			stat(dest_path, &dest_s);
+			vfs_stat_path(src_dent, &src_s);
+			vfs_stat_path(dest_path, &dest_s);
 
 			if (dest_s.index == src_s.index &&
@@ -377,25 +378,33 @@
 	int64_t copied = 0;
 	char *buff = NULL;
+	aoff64_t posr = 0, posw = 0;
+	struct stat st;
 
 	if (vb)
 		printf("Copying %s to %s\n", src, dest);
 
-	if (-1 == (fd1 = open(src, O_RDONLY))) {
+	fd1 = vfs_lookup_open(src, WALK_REGULAR, MODE_READ);
+	if (fd1 < 0) {
 		printf("Unable to open source file %s\n", src);
 		return -1;
 	}
 
-	if (-1 == (fd2 = open(dest, O_CREAT))) {
+	fd2 = vfs_lookup_open(dest, WALK_REGULAR | WALK_MAY_CREATE, MODE_WRITE);
+	if (fd2 < 0) {
 		printf("Unable to open destination file %s\n", dest);
-		close(fd1);
+		vfs_put(fd1);
 		return -1;
 	}
 
-	total = lseek(fd1, 0, SEEK_END);
-
+	if (vfs_stat(fd1, &st) != EOK) {
+		printf("Unable to fstat %d\n", fd1);
+		vfs_put(fd1);
+		vfs_put(fd2);
+		return -1;	
+	}
+
+	total = st.size;
 	if (vb)
 		printf("%" PRIu64 " bytes to copy\n", total);
-
-	lseek(fd1, 0, SEEK_SET);
 
 	if (NULL == (buff = (char *) malloc(blen))) {
@@ -406,6 +415,6 @@
 	}
 
-	while ((bytes = read(fd1, buff, blen)) > 0) {
-		if ((bytes = write(fd2, buff, bytes)) < 0)
+	while ((bytes = vfs_read(fd1, &posr, buff, blen)) > 0) {
+		if ((bytes = vfs_write(fd2, &posw, buff, bytes)) < 0)
 			break;
 		copied += bytes;
@@ -413,11 +422,11 @@
 
 	if (bytes < 0) {
-		printf("\nError copying %s, (%d)\n", src, errno);
+		printf("\nError copying %s, (%d)\n", src, bytes);
 		copied = bytes;
 	}
 
 out:
-	close(fd1);
-	close(fd2);
+	vfs_put(fd1);
+	vfs_put(fd2);
 	if (buff)
 		free(buff);
Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -34,10 +34,8 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <dirent.h>
-#include <fcntl.h>
 #include <getopt.h>
 #include <sys/types.h>
-#include <sys/stat.h>
+#include <vfs/vfs.h>
 #include <str.h>
 #include <sort.h>
@@ -185,8 +183,8 @@
 		buff[len] = '\0';
 
-		rc = stat(buff, &tosort[nbdirs++].s);
-		if (rc != 0) {
+		rc = vfs_stat_path(buff, &tosort[nbdirs++].s);
+		if (rc != EOK) {
 			printf("ls: skipping bogus node %s\n", buff);
-			printf("error=%d\n", errno);
+			printf("error=%d\n", rc);
 			goto out;
 		}
@@ -315,5 +313,5 @@
 static unsigned int ls_scope(const char *path, struct dir_elem_t *de)
 {
-	if (stat(path, &de->s) != 0) {
+	if (vfs_stat_path(path, &de->s) != EOK) {
 		cli_error(CL_ENOENT, "%s", path);
 		return LS_BOGUS;
@@ -388,5 +386,5 @@
 
 	if (argc == 0) {
-		if (getcwd(de.name, PATH_MAX) == NULL) {
+		if (vfs_cwd_get(de.name, PATH_MAX) != EOK) {
 			cli_error(CL_EFAIL, "%s: Failed determining working "
 			    "directory", cmdname);
Index: uspace/app/bdsh/cmds/modules/ls/ls.h
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.h	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/ls/ls.h	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -1,4 +1,6 @@
 #ifndef LS_H
 #define LS_H
+
+#include <vfs/vfs.h>
 
 /* Various values that can be returned by ls_scope() */
Index: uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -30,7 +30,5 @@
 #include <stdlib.h>
 #include <dirent.h>
-#include <fcntl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <getopt.h>
 #include <stdarg.h>
@@ -98,7 +96,8 @@
 
 	if (!create_parents) {
-		if (mkdir(path, 0) != 0) {
+		ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
+		if (ret != EOK) {
 			cli_error(CL_EFAIL, "%s: could not create %s (%s)",
-			    cmdname, path, str_error(errno));
+			    cmdname, path, str_error(ret));
 			ret = 1;
 		}
@@ -136,7 +135,8 @@
 			path[prev_off] = 0;
 
-			if (mkdir(path, 0) != 0 && errno != EEXIST) {
+			ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
+			if (ret != EOK && ret != EEXIST) {
 				cli_error(CL_EFAIL, "%s: could not create %s (%s)",
-				    cmdname, path, str_error(errno));
+				    cmdname, path, str_error(ret));
 				ret = 1;
 				goto leave;
@@ -146,7 +146,8 @@
 		}
 		/* Create the final directory. */
-		if (mkdir(path, 0) != 0) {
+		ret = vfs_link_path(path, KIND_DIRECTORY, NULL);
+		if (ret != EOK) {
 			cli_error(CL_EFAIL, "%s: could not create %s (%s)",
-			    cmdname, path, str_error(errno));
+			    cmdname, path, str_error(ret));
 			ret = 1;
 		}
@@ -207,5 +208,5 @@
 
 	if (follow && (argv[optind] != NULL)) {
-		if (chdir(argv[optind]) != 0)
+		if (vfs_cwd_set(argv[optind]) != EOK)
 			printf("%s: Error switching to directory.", cmdname);
 	}
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -31,7 +31,5 @@
 #include <stdlib.h>
 #include <dirent.h>
-#include <fcntl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <macros.h>
 #include <getopt.h>
@@ -39,4 +37,5 @@
 #include <str.h>
 #include <ctype.h>
+#include <vfs/vfs.h>
 
 #include "config.h"
@@ -121,4 +120,5 @@
 	void *buffer;
 	bool create_sparse = false;
+	aoff64_t pos = 0;
 
 	file_size = 0;
@@ -156,5 +156,5 @@
 	file_name = argv[optind];
 
-	fd = open(file_name, O_CREAT | O_EXCL | O_WRONLY, 0666);
+	fd = vfs_lookup_open(file_name, WALK_REGULAR | WALK_MUST_CREATE, MODE_WRITE);
 	if (fd < 0) {
 		printf("%s: failed to create file %s.\n", cmdname, file_name);
@@ -164,13 +164,9 @@
 	if (create_sparse && file_size > 0) {
 		const char byte = 0x00;
-
-		if ((rc2 = lseek(fd, file_size - 1, SEEK_SET)) < 0) {
-			close(fd);
-			goto error;
-		}
-
-		rc2 = write(fd, &byte, sizeof(char));
+		
+		pos = file_size - 1;
+		rc2 = vfs_write(fd, &pos, &byte, sizeof(char));
 		if (rc2 < 0) {
-			close(fd);
+			vfs_put(fd);
 			goto error;
 		}
@@ -187,8 +183,8 @@
 	while (total_written < file_size) {
 		to_write = min(file_size - total_written, BUFFER_SIZE);
-		rc = write(fd, buffer, to_write);
+		rc = vfs_write(fd, &pos, buffer, to_write);
 		if (rc <= 0) {
 			printf("%s: Error writing file (%d).\n", cmdname, errno);
-			close(fd);
+			vfs_put(fd);
 			free(buffer);
 			return CMD_FAILURE;
@@ -199,5 +195,5 @@
 	free(buffer);
 
-	if (close(fd) < 0)
+	if (vfs_put(fd) < 0)
 		goto error;
 
Index: uspace/app/bdsh/cmds/modules/mount/mount.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mount/mount.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/mount/mount.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -32,4 +32,5 @@
 #include <str_error.h>
 #include <vfs/vfs.h>
+#include <vfs/vfs_mtab.h>
 #include <adt/list.h>
 #include <errno.h>
@@ -82,6 +83,4 @@
 
 		printf("%s", mtab_ent->fs_name);
-		if (mtab_ent->instance)
-			printf("/%d", mtab_ent->instance);
 
 		printf(" %s", mtab_ent->mp);
@@ -94,7 +93,4 @@
 			printf(" (%" PRIun ")", mtab_ent->service_id);
 		}
-
-		if (str_size(mtab_ent->opts) > 0)
-			printf(" (%s)", mtab_ent->opts);
 
 		putchar('\n');
@@ -151,8 +147,8 @@
 		mopts = t_argv[4];
 
-	rc = vfs_mount(t_argv[1], t_argv[2], dev, mopts, 0, instance);
+	rc = vfs_mount_path(t_argv[2], t_argv[1], dev, mopts, 0, instance);
 	if (rc != EOK) {
 		printf("Unable to mount %s filesystem to %s on %s (rc=%s)\n",
-		    t_argv[1], t_argv[2], t_argv[3], str_error(rc));
+		    t_argv[2], t_argv[1], t_argv[3], str_error(rc));
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/modules/mv/mv.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mv/mv.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/mv/mv.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -30,4 +30,5 @@
 #include <stdlib.h>
 #include <errno.h>
+#include <vfs/vfs.h>
 #include "config.h"
 #include "util.h"
@@ -59,8 +60,8 @@
 	}
 
-	rc = rename(argv[1], argv[2]);
-	if (rc != 0) {
+	rc = vfs_rename_path(argv[1], argv[2]);
+	if (rc != EOK) {
 		printf("Unable to rename %s to %s (error=%d)\n",
-		    argv[1], argv[2], errno);
+		    argv[1], argv[2], rc);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/modules/pwd/pwd.c
===================================================================
--- uspace/app/bdsh/cmds/modules/pwd/pwd.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/pwd/pwd.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -30,4 +30,6 @@
 #include <stdlib.h>
 #include <mem.h>
+#include <vfs/vfs.h>
+#include <abi/errno.h>
 
 #include "config.h"
@@ -57,5 +59,5 @@
 	memset(buff, 0, PATH_MAX);
 
-	if (getcwd(buff, PATH_MAX) == NULL) {
+	if (vfs_cwd_get(buff, PATH_MAX) != EOK) {
 		cli_error(CL_EFAIL,
 			"Unable to determine the current working directory");
Index: uspace/app/bdsh/cmds/modules/rm/rm.c
===================================================================
--- uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -30,10 +30,9 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
 #include <dirent.h>
 #include <getopt.h>
 #include <mem.h>
 #include <str.h>
+#include <vfs/vfs.h>
 
 #include "config.h"
@@ -110,7 +109,7 @@
 	memset(rm->cwd, 0, PATH_MAX);
 
-	chdir(".");
-
-	if (NULL == (getcwd(rm->owd, PATH_MAX)))
+	vfs_cwd_set(".");
+
+	if (EOK != vfs_cwd_get(rm->owd, PATH_MAX))
 		return 0;
 
@@ -132,5 +131,5 @@
 static unsigned int rm_single(const char *path)
 {
-	if (unlink(path) != 0) {
+	if (vfs_unlink_path(path) != EOK) {
 		cli_error(CL_EFAIL, "rm: could not remove file %s", path);
 		return 1;
@@ -150,7 +149,7 @@
 	}
 
-	fd = open(path, O_RDONLY);
+	fd = vfs_lookup(path, WALK_REGULAR);
 	if (fd >= 0) {
-		close(fd);
+		vfs_put(fd);
 		return RM_FILE;
 	}
@@ -201,6 +200,6 @@
 
 	/* First see if it will just go away */
-	rc = rmdir(path);
-	if (rc == 0)
+	rc = vfs_unlink_path(path);
+	if (rc == EOK)
 		return 0;
 
@@ -209,7 +208,7 @@
 
 	/* Delete directory */
-	rc = rmdir(path);
-	if (rc == 0)
-		return errno;
+	rc = vfs_unlink_path(path);
+	if (rc == EOK)
+		return EOK;
 
 	cli_error(CL_ENOTSUP, "Can not remove %s", path);
Index: uspace/app/bdsh/cmds/modules/touch/touch.c
===================================================================
--- uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -35,11 +35,10 @@
 #include <stdlib.h>
 #include <unistd.h>
-#include <fcntl.h>
 #include <dirent.h>
 #include <sys/types.h>
 #include <str.h>
 #include <getopt.h>
-#include <sys/stat.h>
 #include <errno.h>
+#include <vfs/vfs.h>
 
 #include "config.h"
@@ -123,6 +122,8 @@
 		
 		/* Check whether file exists if -c (--no-create) option is given */
-		if ((!no_create) || ((no_create) && (stat(buff, &file_stat) == 0)))
-			fd = open(buff, O_RDWR | O_CREAT);
+		if ((!no_create) ||
+		    ((no_create) && (vfs_stat_path(buff, &file_stat) == EOK))) {
+			fd = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE);
+		}
 		
 		if (fd < 0) {
@@ -132,5 +133,5 @@
 			continue;
 		} else {
-			close(fd);
+			vfs_put(fd);
 			fd = -1;
 		}
Index: uspace/app/bdsh/cmds/modules/unmount/unmount.c
===================================================================
--- uspace/app/bdsh/cmds/modules/unmount/unmount.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/cmds/modules/unmount/unmount.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -66,5 +66,5 @@
 	}
 
-	rc = vfs_unmount(argv[1]);
+	rc = vfs_unmount_path(argv[1]);
 	if (rc != EOK) {
 		printf("Unable to unmount %s (rc=%d)\n", argv[1], rc);
Index: uspace/app/bdsh/compl.c
===================================================================
--- uspace/app/bdsh/compl.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/compl.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -33,5 +33,5 @@
 #include <macros.h>
 #include <stdlib.h>
-#include <sys/stat.h>
+#include <vfs/vfs.h>
 
 #include "cmds/cmds.h"
@@ -360,5 +360,5 @@
 				asprintf(&ent_path, "%s/%s", *cs->path, dent->d_name);
 				struct stat ent_stat;
-				if (stat(ent_path, &ent_stat) != 0) {
+				if (vfs_stat_path(ent_path, &ent_stat) != EOK) {
 					/* Error */
 					free(ent_path);
Index: uspace/app/bdsh/exec.c
===================================================================
--- uspace/app/bdsh/exec.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/exec.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -37,5 +37,4 @@
 #include <unistd.h>
 #include <str.h>
-#include <fcntl.h>
 #include <str_error.h>
 #include <errno.h>
@@ -60,7 +59,7 @@
 	int fd;
 
-	fd = open(f, O_RDONLY);
+	fd = vfs_lookup_open(f, WALK_REGULAR, MODE_READ);
 	if (fd >= 0) {
-		close(fd);
+		vfs_put(fd);
 		return 0;
 	} else
@@ -101,6 +100,5 @@
 	char *tmp;
 	int rc, retval, i;
-	int file_handles[3];
-	int *file_handles_p[4];
+	int file_handles[3] = { -1, -1, -1 };
 	FILE *files[3];
 
@@ -113,14 +111,9 @@
 	
 	for (i = 0; i < 3 && files[i] != NULL; i++) {
-		if (vfs_fhandle(files[i], &file_handles[i]) == EOK) {
-			file_handles_p[i] = &file_handles[i];
-		}
-		else {
-			file_handles_p[i] = NULL;
-		}
+		vfs_fhandle(files[i], &file_handles[i]);
 	}
-	file_handles_p[i] = NULL;
 
-	rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, file_handles_p);
+	rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv,
+	    file_handles[0], file_handles[1], file_handles[2]);
 	free(tmp);
 
Index: uspace/app/bdsh/util.c
===================================================================
--- uspace/app/bdsh/util.c	(revision 356c3860b9a6bf870e181055ae6f505c2a7ae7a7)
+++ uspace/app/bdsh/util.c	(revision 9abe2e5367e0d71b259840713b8cf79d80d97fc6)
@@ -31,4 +31,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
+#include <vfs/vfs.h>
+#include <abi/errno.h>
 
 #include "config.h"
@@ -58,5 +60,5 @@
 		return 1;
 	}
-	if (!getcwd(usr->cwd, PATH_MAX)) 
+	if (vfs_cwd_get(usr->cwd, PATH_MAX) != EOK)
 		snprintf(usr->cwd, PATH_MAX, "(unknown)");
 
