Index: uspace/app/tester/stdio/stdio2.c
===================================================================
--- uspace/app/tester/stdio/stdio2.c	(revision 7afd12e59e45e559e134debe6fb7c76fc0d808de)
+++ uspace/app/tester/stdio/stdio2.c	(revision 7ab7075f91a1cf7c0f9d40646b67da033bfd2505)
@@ -37,9 +37,9 @@
 {
 	FILE *file;
-	const char *file_name = "/test";
+	const char *file_name = "/tmp/test";
 
 	TPRINTF("Open file \"%s\" for writing...", file_name);
 	errno = 0;
-	file = fopen(file_name, "wt");
+	file = fopen(file_name, "wtx");
 	if (file == NULL) {
 		TPRINTF("errno = %s\n", str_error_name(errno));
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision 7afd12e59e45e559e134debe6fb7c76fc0d808de)
+++ uspace/lib/c/generic/io/io.c	(revision 7ab7075f91a1cf7c0f9d40646b67da033bfd2505)
@@ -185,9 +185,11 @@
 }
 
-static bool parse_mode(const char *fmode, int *mode, bool *create, bool *truncate)
+static bool parse_mode(const char *fmode, int *mode, bool *create, bool *excl,
+    bool *truncate)
 {
 	/* Parse mode except first character. */
 	const char *mp = fmode;
-	if (*mp++ == 0) {
+
+	if (*mp++ == '\0') {
 		errno = EINVAL;
 		return false;
@@ -201,8 +203,17 @@
 		mp++;
 		plus = true;
-	} else
+	} else {
 		plus = false;
-
-	if (*mp != 0) {
+	}
+
+	bool ex;
+	if (*mp == 'x') {
+		mp++;
+		ex = true;
+	} else {
+		ex = false;
+	}
+
+	if (*mp != '\0') {
 		errno = EINVAL;
 		return false;
@@ -211,4 +222,5 @@
 	*create = false;
 	*truncate = false;
+	*excl = false;
 
 	/* Parse first character of fmode and determine mode for vfs_open(). */
@@ -216,8 +228,13 @@
 	case 'r':
 		*mode = plus ? MODE_READ | MODE_WRITE : MODE_READ;
+		if (ex) {
+			errno = EINVAL;
+			return false;
+		}
 		break;
 	case 'w':
 		*mode = plus ? MODE_READ | MODE_WRITE : MODE_WRITE;
 		*create = true;
+		*excl = ex;
 		if (!plus)
 			*truncate = true;
@@ -227,4 +244,9 @@
 		if (plus) {
 			errno = ENOTSUP;
+			return false;
+		}
+
+		if (ex) {
+			errno = EINVAL;
 			return false;
 		}
@@ -307,5 +329,5 @@
  *
  * @param path Path of the file to open.
- * @param mode Mode string, (r|w|a)[b|t][+].
+ * @param mode Mode string, (r|w|a)[b|t][+][x].
  *
  */
@@ -314,7 +336,8 @@
 	int mode;
 	bool create;
+	bool excl;
 	bool truncate;
 
-	if (!parse_mode(fmode, &mode, &create, &truncate))
+	if (!parse_mode(fmode, &mode, &create, &excl, &truncate))
 		return NULL;
 
@@ -327,5 +350,7 @@
 
 	int flags = WALK_REGULAR;
-	if (create)
+	if (create && excl)
+		flags |= WALK_MUST_CREATE;
+	else if (create)
 		flags |= WALK_MAY_CREATE;
 	int file;
Index: uspace/lib/c/test/stdio.c
===================================================================
--- uspace/lib/c/test/stdio.c	(revision 7afd12e59e45e559e134debe6fb7c76fc0d808de)
+++ uspace/lib/c/test/stdio.c	(revision 7ab7075f91a1cf7c0f9d40646b67da033bfd2505)
@@ -62,5 +62,5 @@
 	PCUT_ASSERT_TRUE(rc != 0);
 
-	f = fopen(buf, "w");
+	f = fopen(buf, "wx");
 	PCUT_ASSERT_NOT_NULL(f);
 	fclose(f);
@@ -92,5 +92,5 @@
 	PCUT_ASSERT_NOT_NULL(p);
 
-	f = fopen(buf1, "w");
+	f = fopen(buf1, "wx");
 	PCUT_ASSERT_NOT_NULL(f);
 	fclose(f);
@@ -142,5 +142,5 @@
 	PCUT_ASSERT_NOT_NULL(p);
 
-	f = fopen(p, "w+");
+	f = fopen(p, "w+x");
 	PCUT_ASSERT_NOT_NULL(f);
 	(void) remove(p);
@@ -174,5 +174,5 @@
 	PCUT_ASSERT_NOT_NULL(p);
 
-	f = fopen(p, "w+");
+	f = fopen(p, "w+x");
 	PCUT_ASSERT_NOT_NULL(f);
 	(void) remove(p);
Index: uspace/lib/posix/test/stdio.c
===================================================================
--- uspace/lib/posix/test/stdio.c	(revision 7afd12e59e45e559e134debe6fb7c76fc0d808de)
+++ uspace/lib/posix/test/stdio.c	(revision 7ab7075f91a1cf7c0f9d40646b67da033bfd2505)
@@ -47,5 +47,5 @@
 	    str_length("/tmp/tmp.")) == 0);
 
-	f = fopen(p, "w+");
+	f = fopen(p, "w+x");
 	PCUT_ASSERT_NOT_NULL(f);
 
@@ -66,5 +66,5 @@
 	    str_length("/tmp/tmp.")) == 0);
 
-	f = fopen(p, "w+");
+	f = fopen(p, "w+x");
 	PCUT_ASSERT_NOT_NULL(f);
 
@@ -85,5 +85,5 @@
 	    str_length(P_tmpdir "/tmp.")) == 0);
 
-	f = fopen(p, "w+");
+	f = fopen(p, "w+x");
 	PCUT_ASSERT_NOT_NULL(f);
 
Index: uspace/lib/sif/src/sif.c
===================================================================
--- uspace/lib/sif/src/sif.c	(revision 7afd12e59e45e559e134debe6fb7c76fc0d808de)
+++ uspace/lib/sif/src/sif.c	(revision 7ab7075f91a1cf7c0f9d40646b67da033bfd2505)
@@ -203,5 +203,5 @@
 	}
 
-	f = fopen(fname, "w");
+	f = fopen(fname, "wx");
 	if (f == NULL) {
 		rc = EIO;
