Index: uspace/lib/c/generic/bd_srv.c
===================================================================
--- uspace/lib/c/generic/bd_srv.c	(revision a46e56be16ae82f0d007dd26c68b250f3f725ae0)
+++ uspace/lib/c/generic/bd_srv.c	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
@@ -43,6 +43,5 @@
 #include <bd_srv.h>
 
-static void bd_read_blocks_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+static void bd_read_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	aoff64_t ba;
@@ -51,11 +50,11 @@
 	size_t size;
 	errno_t rc;
-	cap_call_handle_t rcall_handle;
 
 	ba = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
 	cnt = IPC_GET_ARG3(*call);
 
-	if (!async_data_read_receive(&rcall_handle, &size)) {
-		async_answer_0(chandle, EINVAL);
+	ipc_call_t rcall;
+	if (!async_data_read_receive(&rcall, &size)) {
+		async_answer_0(call, EINVAL);
 		return;
 	}
@@ -63,12 +62,12 @@
 	buf = malloc(size);
 	if (buf == NULL) {
-		async_answer_0(rcall_handle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
+		async_answer_0(&rcall, ENOMEM);
+		async_answer_0(call, ENOMEM);
 		return;
 	}
 
 	if (srv->srvs->ops->read_blocks == NULL) {
-		async_answer_0(rcall_handle, ENOTSUP);
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(&rcall, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		free(buf);
 		return;
@@ -77,18 +76,17 @@
 	rc = srv->srvs->ops->read_blocks(srv, ba, cnt, buf, size);
 	if (rc != EOK) {
-		async_answer_0(rcall_handle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
-		free(buf);
-		return;
-	}
-
-	async_data_read_finalize(rcall_handle, buf, size);
+		async_answer_0(&rcall, ENOMEM);
+		async_answer_0(call, ENOMEM);
+		free(buf);
+		return;
+	}
+
+	async_data_read_finalize(&rcall, buf, size);
 
 	free(buf);
-	async_answer_0(chandle, EOK);
-}
-
-static void bd_read_toc_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+	async_answer_0(call, EOK);
+}
+
+static void bd_read_toc_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	uint8_t session;
@@ -96,10 +94,10 @@
 	size_t size;
 	errno_t rc;
-	cap_call_handle_t rcall_handle;
 
 	session = IPC_GET_ARG1(*call);
 
-	if (!async_data_read_receive(&rcall_handle, &size)) {
-		async_answer_0(chandle, EINVAL);
+	ipc_call_t rcall;
+	if (!async_data_read_receive(&rcall, &size)) {
+		async_answer_0(call, EINVAL);
 		return;
 	}
@@ -107,12 +105,12 @@
 	buf = malloc(size);
 	if (buf == NULL) {
-		async_answer_0(rcall_handle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
+		async_answer_0(&rcall, ENOMEM);
+		async_answer_0(call, ENOMEM);
 		return;
 	}
 
 	if (srv->srvs->ops->read_toc == NULL) {
-		async_answer_0(rcall_handle, ENOTSUP);
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(&rcall, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		free(buf);
 		return;
@@ -121,18 +119,17 @@
 	rc = srv->srvs->ops->read_toc(srv, session, buf, size);
 	if (rc != EOK) {
-		async_answer_0(rcall_handle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
-		free(buf);
-		return;
-	}
-
-	async_data_read_finalize(rcall_handle, buf, size);
+		async_answer_0(&rcall, ENOMEM);
+		async_answer_0(call, ENOMEM);
+		free(buf);
+		return;
+	}
+
+	async_data_read_finalize(&rcall, buf, size);
 
 	free(buf);
-	async_answer_0(chandle, EOK);
-}
-
-static void bd_sync_cache_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+	async_answer_0(call, EOK);
+}
+
+static void bd_sync_cache_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	aoff64_t ba;
@@ -144,14 +141,13 @@
 
 	if (srv->srvs->ops->sync_cache == NULL) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
 
 	rc = srv->srvs->ops->sync_cache(srv, ba, cnt);
-	async_answer_0(chandle, rc);
-}
-
-static void bd_write_blocks_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+	async_answer_0(call, rc);
+}
+
+static void bd_write_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	aoff64_t ba;
@@ -166,10 +162,10 @@
 	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
 	if (rc != EOK) {
-		async_answer_0(chandle, rc);
+		async_answer_0(call, rc);
 		return;
 	}
 
 	if (srv->srvs->ops->write_blocks == NULL) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
@@ -177,9 +173,8 @@
 	rc = srv->srvs->ops->write_blocks(srv, ba, cnt, data, size);
 	free(data);
-	async_answer_0(chandle, rc);
-}
-
-static void bd_get_block_size_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+	async_answer_0(call, rc);
+}
+
+static void bd_get_block_size_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	errno_t rc;
@@ -187,14 +182,13 @@
 
 	if (srv->srvs->ops->get_block_size == NULL) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
 
 	rc = srv->srvs->ops->get_block_size(srv, &block_size);
-	async_answer_1(chandle, rc, block_size);
-}
-
-static void bd_get_num_blocks_srv(bd_srv_t *srv, cap_call_handle_t chandle,
-    ipc_call_t *call)
+	async_answer_1(call, rc, block_size);
+}
+
+static void bd_get_num_blocks_srv(bd_srv_t *srv, ipc_call_t *call)
 {
 	errno_t rc;
@@ -202,10 +196,10 @@
 
 	if (srv->srvs->ops->get_num_blocks == NULL) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
 
 	rc = srv->srvs->ops->get_num_blocks(srv, &num_blocks);
-	async_answer_2(chandle, rc, LOWER32(num_blocks), UPPER32(num_blocks));
+	async_answer_2(call, rc, LOWER32(num_blocks), UPPER32(num_blocks));
 }
 
@@ -228,5 +222,5 @@
 }
 
-errno_t bd_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, bd_srvs_t *srvs)
+errno_t bd_conn(ipc_call_t *icall, bd_srvs_t *srvs)
 {
 	bd_srv_t *srv;
@@ -234,5 +228,5 @@
 
 	/* Accept the connection */
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 
 	srv = bd_srv_create(srvs);
@@ -252,10 +246,10 @@
 	while (true) {
 		ipc_call_t call;
-		cap_call_handle_t chandle = async_get_call(&call);
+		async_get_call(&call);
 		sysarg_t method = IPC_GET_IMETHOD(call);
 
 		if (!method) {
 			/* The other side has hung up */
-			async_answer_0(chandle, EOK);
+			async_answer_0(&call, EOK);
 			break;
 		}
@@ -263,23 +257,23 @@
 		switch (method) {
 		case BD_READ_BLOCKS:
-			bd_read_blocks_srv(srv, chandle, &call);
+			bd_read_blocks_srv(srv, &call);
 			break;
 		case BD_READ_TOC:
-			bd_read_toc_srv(srv, chandle, &call);
+			bd_read_toc_srv(srv, &call);
 			break;
 		case BD_SYNC_CACHE:
-			bd_sync_cache_srv(srv, chandle, &call);
+			bd_sync_cache_srv(srv, &call);
 			break;
 		case BD_WRITE_BLOCKS:
-			bd_write_blocks_srv(srv, chandle, &call);
+			bd_write_blocks_srv(srv, &call);
 			break;
 		case BD_GET_BLOCK_SIZE:
-			bd_get_block_size_srv(srv, chandle, &call);
+			bd_get_block_size_srv(srv, &call);
 			break;
 		case BD_GET_NUM_BLOCKS:
-			bd_get_num_blocks_srv(srv, chandle, &call);
+			bd_get_num_blocks_srv(srv, &call);
 			break;
 		default:
-			async_answer_0(chandle, EINVAL);
+			async_answer_0(&call, EINVAL);
 		}
 	}
