Index: uspace/app/bdsh/cmds/modules/cmp/cmp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -101,5 +101,5 @@
 		    memcmp(buffer[0], buffer[1], offset[0]) != 0) {
 			printf("Return 1\n");
-			rc = 1;
+			rc = EBUSY;
 			goto end;
 		}
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -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);
Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/bdsh/input.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -73,5 +73,5 @@
 	
 	char *cmd[WORD_MAX];
-	int rc = 0;
+	int rc = EOK;
 	tokenizer_t tok;
 	unsigned int i, pipe_count, processed_pipes;
@@ -82,5 +82,5 @@
 	if (usr->line == NULL) {
 		free(tokens_buf);
-		return CL_EFAIL;
+		return EINVAL;
 	}
 
@@ -198,5 +198,9 @@
 	}
 
-	rc = run_command(cmd, usr, &new_iostate);
+	if (run_command(cmd, usr, &new_iostate) == 0) {
+		rc = EOK;
+	} else {
+		rc = EINVAL;
+	}
 	
 finit_with_files:
Index: uspace/app/fontviewer/fontviewer.c
===================================================================
--- uspace/app/fontviewer/fontviewer.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/fontviewer/fontviewer.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -149,12 +149,11 @@
 	va_end(args);
 	
-	if (ret <= 0)
-		return ret;
-	
-	drawctx_set_source(drawctx, source);
-	drawctx_set_font(drawctx, font);
-	drawctx_print(drawctx, str, x, y);
-	
-	free(str);
+	if (ret >= 0) {
+		drawctx_set_source(drawctx, source);
+		drawctx_set_font(drawctx, font);
+		drawctx_print(drawctx, str, x, y);
+
+		free(str);
+	}
 	
 	return ret;
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/init/init.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -208,5 +208,5 @@
 		    path, retval);
 	
-	return retval;
+	return retval == 0 ? EOK : EPARTY;
 }
 
Index: uspace/app/pkg/pkg.c
===================================================================
--- uspace/app/pkg/pkg.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/pkg/pkg.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -96,5 +96,5 @@
 	}
 
-	return retval;
+	return retval == 0 ? EOK : EPARTY;
 }
 
Index: uspace/app/trace/ipcp.c
===================================================================
--- uspace/app/trace/ipcp.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/trace/ipcp.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -281,5 +281,5 @@
 			if (oper->rv_type != V_VOID) {
 				putchar(' ');
-				val_print(retval, oper->rv_type);
+				val_print((sysarg_t) retval, oper->rv_type);
 			}
 			
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision 39b54fe7194b1ffcbd629620649e5551d1fef2ea)
+++ uspace/app/trace/trace.c	(revision bad8d4136b523b5f03e2ad0b94d0023852fecd16)
@@ -260,5 +260,5 @@
 
 
-static void print_sc_retval(int retval, val_type_t val_type)
+static void print_sc_retval(sysarg_t retval, val_type_t val_type)
 {
 	printf(" -> ");
@@ -296,13 +296,13 @@
 	IPC_SET_ARG5(call, 0);
 
-	ipcp_call_out(phoneid, &call, sc_rc);
-}
-
-static void sc_ipc_call_async_slow(sysarg_t *sc_args, sysarg_t sc_rc)
+	ipcp_call_out(phoneid, &call, 0);
+}
+
+static void sc_ipc_call_async_slow(sysarg_t *sc_args, int sc_rc)
 {
 	ipc_call_t call;
 	int rc;
 
-	if (sc_rc != (sysarg_t) EOK)
+	if (sc_rc != EOK)
 		return;
 
@@ -310,6 +310,6 @@
 	rc = udebug_mem_read(sess, &call.args, sc_args[1], sizeof(call.args));
 
-	if (rc >= 0) {
-		ipcp_call_out(sc_args[0], &call, sc_rc);
+	if (rc == EOK) {
+		ipcp_call_out(sc_args[0], &call, 0);
 	}
 }
@@ -581,5 +581,5 @@
 		
 		if (!console_get_event(console, &event))
-			return -1;
+			return EINVAL;
 		
 		if (event.type == CEV_KEY) {
