Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision dd8ab1cacb307cb1ac01aa4918c789d13e112e56)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision db3089df1b73fd8c776071a2bef307f5226bdf9b)
@@ -266,5 +266,7 @@
 
 		/* call copy_file and exit */
-		rc = (copy_file(src, dest_path, blen, vb) < 0);
+		if (copy_file(src, dest_path, blen, vb) < 0) {
+			rc = EIO;
+		}
 
 	} else if (src_type == TYPE_DIR) {
@@ -434,5 +436,5 @@
 	if (rc != EOK) {
 		printf("\nError copying %s: %s\n", src, str_error(rc));
-		return rc;
+		return -1;
 	}
 
@@ -442,5 +444,9 @@
 	if (buff)
 		free(buff);
-	return rc;
+	if (rc != EOK) {
+		return -1;
+	} else {
+		return 0;
+	}
 }
 
@@ -473,5 +479,5 @@
 	int force = 0, interactive = 0;
 	int c, opt_ind;
-	int64_t ret;
+	int ret;
 
 	con = console_init(stdin, stdout);
