Index: uspace/app/bdsh/cmds/modules/rm/rm.c
===================================================================
--- uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 9c4cf0dece5b4450b06dbeff053298634d87e0ae)
+++ uspace/app/bdsh/cmds/modules/rm/rm.c	(revision a6fc88aa460096502eae43ccce7f29d4eed95e58)
@@ -30,5 +30,4 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <dirent.h>
 #include <getopt.h>
@@ -110,7 +109,7 @@
 	memset(rm->cwd, 0, PATH_MAX);
 
-	chdir(".");
-
-	if (NULL == (getcwd(rm->owd, PATH_MAX)))
+	vfs_cwd_set(".");
+
+	if (EOK != vfs_cwd_get(rm->owd, PATH_MAX))
 		return 0;
 
