Index: uspace/lib/posix/internal/common.h
===================================================================
--- uspace/lib/posix/internal/common.h	(revision 58115ae14b062b9ca747c251e60ba19fc8f37a74)
+++ uspace/lib/posix/internal/common.h	(revision 75406dc862a4d7c240dc10c1d197f3007aac3f49)
@@ -43,4 +43,14 @@
     __func__, __FILE__, __LINE__), abort())
 
+/* A little helper macro to avoid typing this over and over. */
+#define errnify(func, ...) ({ \
+	int rc = func(__VA_ARGS__); \
+	if (rc < 0) { \
+		errno = -rc; \
+		rc = -1; \
+	} \
+	rc; \
+})
+
 #endif /* LIBPOSIX_COMMON_H_ */
 
Index: uspace/lib/posix/stdio.c
===================================================================
--- uspace/lib/posix/stdio.c	(revision 58115ae14b062b9ca747c251e60ba19fc8f37a74)
+++ uspace/lib/posix/stdio.c	(revision 75406dc862a4d7c240dc10c1d197f3007aac3f49)
@@ -722,4 +722,16 @@
 
 /**
+ * Rename a file or directory.
+ *
+ * @param old
+ * @param new
+ * @return Zero on success, -1 (with errno set) otherwise.
+ */
+int posix_rename(const char *old, const char *new)
+{
+	return errnify(rename, old, new);
+}
+
+/**
  * 
  * @param s
Index: uspace/lib/posix/stdio.h
===================================================================
--- uspace/lib/posix/stdio.h	(revision 58115ae14b062b9ca747c251e60ba19fc8f37a74)
+++ uspace/lib/posix/stdio.h	(revision 75406dc862a4d7c240dc10c1d197f3007aac3f49)
@@ -116,4 +116,7 @@
 extern int posix_remove(const char *path);
 
+/* Renaming Files */
+extern int posix_rename(const char *old, const char *new);
+
 /* Temporary Files */
 #undef L_tmpnam
@@ -170,4 +173,6 @@
 	#define remove posix_remove
 
+	#define rename posix_rename
+
 	#define tmpnam posix_tmpnam
 #endif
Index: uspace/lib/posix/unistd.c
===================================================================
--- uspace/lib/posix/unistd.c	(revision 58115ae14b062b9ca747c251e60ba19fc8f37a74)
+++ uspace/lib/posix/unistd.c	(revision 75406dc862a4d7c240dc10c1d197f3007aac3f49)
@@ -111,8 +111,18 @@
 	}
 	char *ret = getcwd(buf, size);
-	if (ret == NULL && errno == EOK) {
+	if (ret == NULL) {
 		errno = ERANGE;
 	}
 	return ret;
+}
+
+/**
+ * Change the current working directory.
+ *
+ * @param path New working directory.
+ */
+int posix_chdir(const char *path)
+{
+	return errnify(chdir, path);
 }
 
@@ -157,4 +167,15 @@
 	/* There is currently no support for user accounts in HelenOS. */
 	return 0;
+}
+
+/**
+ * Close a file.
+ *
+ * @param fildes
+ * @return 0 on success, -1 on error.
+ */
+int posix_close(int fildes)
+{
+	return errnify(close, fildes);
 }
 
@@ -169,11 +190,33 @@
 ssize_t posix_read(int fildes, void *buf, size_t nbyte)
 {
-	int rc = read(fildes, buf, nbyte);
-	if (rc < 0) {
-		errno = -rc;
-		return -1;
-	} else {
-		return rc;
-	}
+	return errnify(read, fildes, buf, nbyte);
+}
+
+/**
+ * Write to a file.
+ *
+ * @param fildes File descriptor of the opened file.
+ * @param buf Buffer to write.
+ * @param nbyte Size of the buffer.
+ * @return Number of written bytes on success, -1 otherwise.
+ */
+ssize_t posix_write(int fildes, const void *buf, size_t nbyte)
+{
+	return errnify(write, fildes, buf, nbyte);
+}
+
+/**
+ * Requests outstanding data to be written to the underlying storage device.
+ *
+ * @param fildes
+ */
+int posix_fsync(int fildes)
+{
+	return errnify(fsync, fildes);
+}
+
+int posix_ftruncate(int fildes, posix_off_t length)
+{
+	return errnify(ftruncate, fildes, (aoff64_t) length);
 }
 
@@ -186,10 +229,5 @@
 int posix_rmdir(const char *path)
 {
-	int rc = rmdir(path);
-	if (rc != EOK) {
-		errno = -rc;
-		return -1;
-	}
-	return 0;
+	return errnify(rmdir, path);
 }
 
@@ -202,11 +240,15 @@
 int posix_unlink(const char *path)
 {
-	int rc = unlink(path);
-	if (rc < 0) {
-		errno = -rc;
-		return -1;
-	} else {
-		return rc;
-	}
+	return errnify(unlink, path);
+}
+
+int posix_dup(int fildes)
+{
+	return posix_fcntl(fildes, F_DUPFD, 0);
+}
+
+int posix_dup2(int fildes, int fildes2)
+{
+	return errnify(dup2, fildes, fildes2);
 }
 
@@ -220,14 +262,17 @@
 int posix_access(const char *path, int amode)
 {
-	if (amode == F_OK) {
-		/* Check file existence by attempt to open it. */
+	if (amode == F_OK || (amode & (X_OK | W_OK | R_OK))) {
+		/* HelenOS doesn't support permissions, permission checks
+		 * are equal to existence check.
+		 *
+		 * Check file existence by attempting to open it.
+		 */
 		int fd = open(path, O_RDONLY);
-		if (fd != -1) {
-			close(fd);
+		if (fd < 0) {
+			errno = -fd;
+			return 0;
 		}
-		return fd;
-	} else if (amode & (X_OK | W_OK | R_OK)) {
-		/* HelenOS doesn't support permissions, return success. */
-		return 0;
+		close(fd);
+		return 1;
 	} else {
 		/* Invalid amode argument. */
Index: uspace/lib/posix/unistd.h
===================================================================
--- uspace/lib/posix/unistd.h	(revision 58115ae14b062b9ca747c251e60ba19fc8f37a74)
+++ uspace/lib/posix/unistd.h	(revision 75406dc862a4d7c240dc10c1d197f3007aac3f49)
@@ -60,4 +60,5 @@
 /* Working Directory */
 extern char *posix_getcwd(char *buf, size_t size);
+extern int posix_chdir(const char *path);
 
 /* Query Memory Parameters */
@@ -69,10 +70,18 @@
 extern posix_gid_t posix_getgid(void);
 
-/* File Input/Output */
+/* File Manipulation */
+extern int posix_close(int fildes);
+
 extern ssize_t posix_read(int fildes, void *buf, size_t nbyte);
+extern ssize_t posix_write(int fildes, const void *buf, size_t nbyte);
 
-/* Deleting Files */
+extern int posix_fsync(int fildes);
+extern int posix_ftruncate(int fildes, posix_off_t length);
+
 extern int posix_rmdir(const char *path);
 extern int posix_unlink(const char *path);
+
+extern int posix_dup(int fildes);
+extern int posix_dup2(int fildes, int fildes2);
 
 /* Standard Streams */
@@ -145,4 +154,5 @@
 
 	#define getcwd posix_getcwd
+	#define chdir posix_chdir
 
 	#define isatty posix_isatty
@@ -155,8 +165,13 @@
 	#define getgid posix_getgid
 
+	#define close posix_close
 	#define read posix_read
-
+	#define write posix_write
+	#define fsync posix_fsync
+	#define ftruncate posix_ftruncate
 	#define rmdir posix_rmdir
 	#define unlink posix_unlink
+	#define dup posix_dup
+	#define dup2 posix_dup2
 
 	#define access posix_access
