Index: uspace/lib/posix/source/unistd.c
===================================================================
--- uspace/lib/posix/source/unistd.c	(revision ce04ea446ae259288dc1f51ca1fdcc70dd74d6bb)
+++ uspace/lib/posix/source/unistd.c	(revision d96d9bc5bc83bd59f4423a29c4c4ee459b2c9b44)
@@ -108,12 +108,8 @@
 char *posix_getcwd(char *buf, size_t size)
 {
-	char *p = getcwd(buf, size);
-
-	if (p == NULL) {
-		errno = -errno;
+	int rc = rcerrno(vfs_cwd_get, buf, size);
+	if (rc != EOK) 
 		return NULL;
-	}
-
-	return p;
+	return buf;
 }
 
@@ -125,5 +121,8 @@
 int posix_chdir(const char *path)
 {
-	return negerrno(chdir, path);
+	int rc = rcerrno(vfs_cwd_set, path);
+	if (rc != EOK)
+		return -1;
+	return 0;
 }
 
