Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 6afc9d780e775e54c1cfb5d3c57fb749979b18d2)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision ae7bfbbd6c5f88b20c47f0b8dec92d82046a2b33)
@@ -39,5 +39,5 @@
 #include <getopt.h>
 #include <sys/types.h>
-#include <sys/stat.h>
+#include <vfs/vfs.h>
 #include <str.h>
 #include <sort.h>
@@ -185,8 +185,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 +315,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;
Index: uspace/app/bdsh/cmds/modules/ls/ls.h
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.h	(revision 6afc9d780e775e54c1cfb5d3c57fb749979b18d2)
+++ uspace/app/bdsh/cmds/modules/ls/ls.h	(revision ae7bfbbd6c5f88b20c47f0b8dec92d82046a2b33)
@@ -1,4 +1,6 @@
 #ifndef LS_H
 #define LS_H
+
+#include <vfs/vfs.h>
 
 /* Various values that can be returned by ls_scope() */
