Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ 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 a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ 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 a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ 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>
Index: uspace/app/fontviewer/fontviewer.c
===================================================================
--- uspace/app/fontviewer/fontviewer.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/fontviewer/fontviewer.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -36,5 +36,4 @@
 #include <unistd.h>
 #include <fcntl.h>
-#include <sys/stat.h>
 #include <errno.h>
 #include <malloc.h>
Index: uspace/app/sysinst/futil.c
===================================================================
--- uspace/app/sysinst/futil.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/sysinst/futil.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -39,5 +39,4 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 #include <vfs/vfs.h>
 #include <sys/types.h>
@@ -130,5 +129,5 @@
 		} else if (s.is_directory) {
 			printf("Create directory '%s'\n", destp);
-			rc = mkdir(destp, 0);
+			rc = vfs_link_path(destp, KIND_DIRECTORY);
 			if (rc != EOK)
 				return EIO;
Index: uspace/app/sysinst/sysinst.c
===================================================================
--- uspace/app/sysinst/sysinst.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/sysinst/sysinst.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -43,5 +43,4 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 #include <task.h>
 #include <vfs/vfs.h>
@@ -175,5 +174,5 @@
 		return EIO;
 
-	rc = mkdir(MOUNT_POINT, 0);
+	rc = vfs_link_path(MOUNT_POINT, KIND_DIRECTORY);
 	if (rc != EOK)
 		return rc;
@@ -214,5 +213,5 @@
 
 	printf("sysinst_copy_boot_files(): create CD mount point\n");
-	rc = mkdir(CD_MOUNT_POINT, 0);
+	rc = vfs_link_path(CD_MOUNT_POINT, KIND_DIRECTORY);
 	if (rc != EOK)
 		return rc;
Index: uspace/app/taskdump/elf_core.c
===================================================================
--- uspace/app/taskdump/elf_core.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/taskdump/elf_core.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -54,5 +54,4 @@
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
Index: uspace/app/taskdump/symtab.c
===================================================================
--- uspace/app/taskdump/symtab.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/taskdump/symtab.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -41,5 +41,4 @@
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
Index: uspace/app/tester/hw/misc/virtchar1.c
===================================================================
--- uspace/app/tester/hw/misc/virtchar1.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/tester/hw/misc/virtchar1.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -45,5 +45,4 @@
 #include <vfs/vfs.h>
 #include <vfs/vfs_sess.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include "../../tester.h"
Index: uspace/app/tester/vfs/vfs1.c
===================================================================
--- uspace/app/tester/vfs/vfs1.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/tester/vfs/vfs1.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -37,5 +37,4 @@
 #include <loc.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include "../tester.h"
 
@@ -71,8 +70,10 @@
 {
 	aoff64_t pos = 0;
+	int rc;
 
-	if (mkdir(TEST_DIRECTORY, 0) != 0) {
-		TPRINTF("rc=%d\n", errno);
-		return "mkdir() failed";
+	rc = vfs_link_path(TEST_DIRECTORY, KIND_DIRECTORY);
+	if (rc != EOK) {
+		TPRINTF("rc=%d\n", rc);
+		return "vfs_link_path() failed";
 	}
 	TPRINTF("Created directory %s\n", TEST_DIRECTORY);
Index: uspace/app/untar/main.c
===================================================================
--- uspace/app/untar/main.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/untar/main.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -35,7 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 #include <errno.h>
 #include <str_error.h>
+#include <vfs/vfs.h>
 #include "tar.h"
 
@@ -103,9 +103,12 @@
 static int handle_directory(const tar_header_t *header, FILE *tarfile)
 {
-	if (mkdir(header->filename, 0755) != 0) {
-		if (errno != EEXIST) {
+	int rc;
+
+	rc = vfs_link_path(header->filename, KIND_DIRECTORY);
+	if (rc != EOK) {
+		if (rc != EEXIST) {
 			fprintf(stderr, "Failed to create directory %s: %s.\n",
-			    header->filename, str_error(errno));
-			return errno;
+			    header->filename, str_error(rc));
+			return rc;
 		}
 	}
Index: uspace/app/websrv/websrv.c
===================================================================
--- uspace/app/websrv/websrv.c	(revision a56cef94f0134cc76a541b53862ec1f1d710d49c)
+++ uspace/app/websrv/websrv.c	(revision 6e5562a50605c74483afabb2b90fff85b7f3b5cc)
@@ -39,5 +39,4 @@
 #include <stdio.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <stdlib.h>
 #include <fcntl.h>
