Index: uspace/lib/posix/fcntl.c
===================================================================
--- uspace/lib/posix/fcntl.c	(revision 3190e88f9acc9542b60dfabd34fed444e2548d21)
+++ uspace/lib/posix/fcntl.c	(revision 53738d363dfe64f2c2f3ef4b2a9212eda500f333)
@@ -52,39 +52,14 @@
 int posix_fcntl(int fd, int cmd, ...)
 {
-	int rc;
 	int flags;
 
 	switch (cmd) {
 	case F_DUPFD:
-	case F_DUPFD_CLOEXEC: /* FD_CLOEXEC is not supported. */
-		/* VFS does not provide means to express constraints on the new
-		 * file descriptor so the third argument is ignored. */
-
-		/* Retrieve node triplet corresponding to the file descriptor. */
-		/* Empty statement after label. */;
-		fdi_node_t node;
-		rc = fd_node(fd, &node);
-		if (rc != EOK) {
-			errno = -rc;
-			return -1;
-		}
-
-		/* Reopen the node so the fresh file descriptor is generated. */
-		int newfd = open_node(&node, 0);
-		if (newfd < 0) {
-			errno = -newfd;
-			return -1;
-		}
-
-		/* Associate the newly generated descriptor to the file description
-		 * of the old file descriptor. Just reopened node will be automatically
-		 * closed. */
-		rc = dup2(fd, newfd);
-		if (rc != EOK) {
-			errno = -rc;
-			return -1;
-		}
-
-		return newfd;
+	case F_DUPFD_CLOEXEC:
+		/* VFS currently does not provide the functionality to duplicate
+		 * opened file descriptor. */
+		// FIXME: implement this once dup() is available
+		errno = ENOTSUP;
+		return -1;
 	case F_GETFD:
 		/* FD_CLOEXEC is not supported. There are no other flags. */
Index: uspace/lib/posix/stdio.c
===================================================================
--- uspace/lib/posix/stdio.c	(revision 3190e88f9acc9542b60dfabd34fed444e2548d21)
+++ uspace/lib/posix/stdio.c	(revision 53738d363dfe64f2c2f3ef4b2a9212eda500f333)
@@ -257,40 +257,16 @@
 	assert(stream != NULL);
 	
-	/* Retrieve the node. */
-	struct stat st;
-	int rc;
-	
 	if (filename == NULL) {
-		rc = fstat(stream->fd, &st);
-	} else {
-		rc = stat(filename, &st);
-		if (-rc == ENOENT) {
-			/* file does not exist, create new file */
-			FILE* tmp = fopen(filename, mode);
-			if (tmp != NULL) {
-				fclose(tmp);
-				/* try again */
-				rc = stat(filename, &st);
-			}
-		}
-	}
-	
-	if (rc != EOK) {
-		fclose(stream);
-		errno = -rc;
-		return NULL;
-	}
-	
-	fdi_node_t node = {
-		.fs_handle = st.fs_handle,
-		.service_id = st.service_id,
-		.index = st.index
-	};
+		/* POSIX allows this to be imlementation-defined. HelenOS currently
+		 * does not support changing the mode. */
+		// FIXME: handle mode change once it is supported
+		return stream;
+	}
 	
 	/* Open a new stream. */
-	FILE* new = fopen_node(&node, mode);
+	FILE* new = fopen(filename, mode);
 	if (new == NULL) {
 		fclose(stream);
-		/* fopen_node() sets errno. */
+		/* errno was set by fopen() */
 		return NULL;
 	}
