Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 79ea5af7eec765b8d511aeadc76b09d6eebb8be0)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -36,5 +36,4 @@
 #include <str.h>
 #include <fcntl.h>
-#include <sys/stat.h>
 #include <vfs/vfs.h>
 #include <dirent.h>
@@ -296,5 +295,5 @@
 				merge_paths(dest_path, PATH_MAX, src_dirname);
 
-				if (mkdir(dest_path, 0) != 0) {
+				if (vfs_link_path(dest_path, KIND_DIRECTORY) != EOK) {
 					printf("Unable to create "
 					    "dest directory %s\n", dest_path);
@@ -310,5 +309,5 @@
 			 * e.g. cp -r /src /data/new_dir_src
 			 */
-			if (mkdir(dest_path, 0) != 0) {
+			if (vfs_link_path(dest_path, KIND_DIRECTORY) != EOK) {
 				printf("Unable to create "
 				    "dest directory %s\n", dest_path);
Index: uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 79ea5af7eec765b8d511aeadc76b09d6eebb8be0)
+++ uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -32,5 +32,4 @@
 #include <fcntl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <getopt.h>
 #include <stdarg.h>
@@ -98,7 +97,8 @@
 
 	if (!create_parents) {
-		if (mkdir(path, 0) != 0) {
+		ret = vfs_link_path(path, KIND_DIRECTORY);
+		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 +136,8 @@
 			path[prev_off] = 0;
 
-			if (mkdir(path, 0) != 0 && errno != EEXIST) {
+			ret = vfs_link_path(path, KIND_DIRECTORY);
+			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 +147,8 @@
 		}
 		/* Create the final directory. */
-		if (mkdir(path, 0) != 0) {
+		ret = vfs_link_path(path, KIND_DIRECTORY);
+		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;
 		}
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 79ea5af7eec765b8d511aeadc76b09d6eebb8be0)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -33,5 +33,4 @@
 #include <fcntl.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <macros.h>
 #include <getopt.h>
