Index: uspace/srv/bd/vbd/vbd.c
===================================================================
--- uspace/srv/bd/vbd/vbd.c	(revision a46e56be16ae82f0d007dd26c68b250f3f725ae0)
+++ uspace/srv/bd/vbd/vbd.c	(revision 63d46341182c752620dcc5a2233d205cee1075dd)
@@ -53,5 +53,5 @@
 #define NAME  "vbd"
 
-static void vbds_client_conn(cap_call_handle_t, ipc_call_t *, void *);
+static void vbds_client_conn(ipc_call_t *, void *);
 
 static service_id_t ctl_sid;
@@ -87,14 +87,14 @@
 }
 
-static void vbds_get_disks_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+static void vbds_get_disks_srv(ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t size;
 	size_t act_size;
 	errno_t rc;
 
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
@@ -102,6 +102,6 @@
 	service_id_t *id_buf = (service_id_t *) malloc(size);
 	if (id_buf == NULL) {
-		async_answer_0(chandle, ENOMEM);
-		async_answer_0(icall_handle, ENOMEM);
+		async_answer_0(&call, ENOMEM);
+		async_answer_0(icall, ENOMEM);
 		return;
 	}
@@ -110,16 +110,16 @@
 	if (rc != EOK) {
 		free(id_buf);
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	errno_t retval = async_data_read_finalize(chandle, id_buf, size);
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	errno_t retval = async_data_read_finalize(&call, id_buf, size);
 	free(id_buf);
 
-	async_answer_1(icall_handle, retval, act_size);
-}
-
-static void vbds_disk_info_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+	async_answer_1(icall, retval, act_size);
+}
+
+static void vbds_disk_info_srv(ipc_call_t *icall)
 {
 	service_id_t disk_sid;
@@ -132,34 +132,34 @@
 	rc = vbds_disk_info(disk_sid, &dinfo);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	cap_call_handle_t chandle;
-	size_t size;
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	ipc_call_t call;
+	size_t size;
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(vbd_disk_info_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_read_finalize(chandle, &dinfo,
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_read_finalize(&call, &dinfo,
 	    min(size, sizeof(dinfo)));
 	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_0(icall_handle, EOK);
-}
-
-static void vbds_label_create_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_0(icall, EOK);
+}
+
+static void vbds_label_create_srv(ipc_call_t *icall)
 {
 	service_id_t disk_sid;
@@ -172,8 +172,8 @@
 	ltype = IPC_GET_ARG2(*icall);
 	rc = vbds_label_create(disk_sid, ltype);
-	async_answer_0(icall_handle, rc);
-}
-
-static void vbds_label_delete_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+	async_answer_0(icall, rc);
+}
+
+static void vbds_label_delete_srv(ipc_call_t *icall)
 {
 	service_id_t disk_sid;
@@ -184,10 +184,10 @@
 	disk_sid = IPC_GET_ARG1(*icall);
 	rc = vbds_label_delete(disk_sid);
-	async_answer_0(icall_handle, rc);
-}
-
-static void vbds_label_get_parts_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+	async_answer_0(icall, rc);
+}
+
+static void vbds_label_get_parts_srv(ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t size;
 	size_t act_size;
@@ -197,7 +197,7 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_label_get_parts_srv()");
 
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
@@ -207,6 +207,6 @@
 	category_id_t *id_buf = (category_id_t *) malloc(size);
 	if (id_buf == NULL) {
-		async_answer_0(chandle, ENOMEM);
-		async_answer_0(icall_handle, ENOMEM);
+		async_answer_0(&call, ENOMEM);
+		async_answer_0(icall, ENOMEM);
 		return;
 	}
@@ -214,16 +214,16 @@
 	rc = vbds_get_parts(sid, id_buf, size, &act_size);
 	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	errno_t retval = async_data_read_finalize(chandle, id_buf, size);
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	errno_t retval = async_data_read_finalize(&call, id_buf, size);
 	free(id_buf);
 
-	async_answer_1(icall_handle, retval, act_size);
-}
-
-static void vbds_part_get_info_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+	async_answer_1(icall, retval, act_size);
+}
+
+static void vbds_part_get_info_srv(ipc_call_t *icall)
 {
 	vbds_part_id_t part;
@@ -236,34 +236,34 @@
 	rc = vbds_part_get_info(part, &pinfo);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	cap_call_handle_t chandle;
-	size_t size;
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	ipc_call_t call;
+	size_t size;
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(vbd_part_info_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_read_finalize(chandle, &pinfo,
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_read_finalize(&call, &pinfo,
 	    min(size, sizeof(pinfo)));
 	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_0(icall_handle, EOK);
-}
-
-static void vbds_part_create_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_0(icall, EOK);
+}
+
+static void vbds_part_create_srv(ipc_call_t *icall)
 {
 	service_id_t disk_sid;
@@ -276,22 +276,22 @@
 	disk_sid = IPC_GET_ARG1(*icall);
 
-	cap_call_handle_t chandle;
-	size_t size;
-	if (!async_data_write_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	ipc_call_t call;
+	size_t size;
+	if (!async_data_write_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(vbd_part_spec_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_write_finalize(chandle, &pspec, sizeof(vbd_part_spec_t));
-	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_write_finalize(&call, &pspec, sizeof(vbd_part_spec_t));
+	if (rc != EOK) {
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
 		return;
 	}
@@ -299,12 +299,12 @@
 	rc = vbds_part_create(disk_sid, &pspec, &part);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_1(icall_handle, rc, (sysarg_t)part);
-}
-
-static void vbds_part_delete_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_1(icall, rc, (sysarg_t)part);
+}
+
+static void vbds_part_delete_srv(ipc_call_t *icall)
 {
 	vbds_part_id_t part;
@@ -315,8 +315,8 @@
 	part = IPC_GET_ARG1(*icall);
 	rc = vbds_part_delete(part);
-	async_answer_0(icall_handle, rc);
-}
-
-static void vbds_suggest_ptype_srv(cap_call_handle_t icall_handle, ipc_call_t *icall)
+	async_answer_0(icall, rc);
+}
+
+static void vbds_suggest_ptype_srv(ipc_call_t *icall)
 {
 	service_id_t disk_sid;
@@ -332,47 +332,47 @@
 	rc = vbds_suggest_ptype(disk_sid, pcnt, &ptype);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	cap_call_handle_t chandle;
-	size_t size;
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	ipc_call_t call;
+	size_t size;
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(label_ptype_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_read_finalize(chandle, &ptype, sizeof(label_ptype_t));
-	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_0(icall_handle, EOK);
-}
-
-static void vbds_ctl_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_read_finalize(&call, &ptype, sizeof(label_ptype_t));
+	if (rc != EOK) {
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_0(icall, EOK);
+}
+
+static void vbds_ctl_conn(ipc_call_t *icall, void *arg)
 {
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_client_conn()");
 
 	/* Accept the connection */
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 
 	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);
 			return;
 		}
@@ -380,37 +380,37 @@
 		switch (method) {
 		case VBD_GET_DISKS:
-			vbds_get_disks_srv(chandle, &call);
+			vbds_get_disks_srv(&call);
 			break;
 		case VBD_DISK_INFO:
-			vbds_disk_info_srv(chandle, &call);
+			vbds_disk_info_srv(&call);
 			break;
 		case VBD_LABEL_CREATE:
-			vbds_label_create_srv(chandle, &call);
+			vbds_label_create_srv(&call);
 			break;
 		case VBD_LABEL_DELETE:
-			vbds_label_delete_srv(chandle, &call);
+			vbds_label_delete_srv(&call);
 			break;
 		case VBD_LABEL_GET_PARTS:
-			vbds_label_get_parts_srv(chandle, &call);
+			vbds_label_get_parts_srv(&call);
 			break;
 		case VBD_PART_GET_INFO:
-			vbds_part_get_info_srv(chandle, &call);
+			vbds_part_get_info_srv(&call);
 			break;
 		case VBD_PART_CREATE:
-			vbds_part_create_srv(chandle, &call);
+			vbds_part_create_srv(&call);
 			break;
 		case VBD_PART_DELETE:
-			vbds_part_delete_srv(chandle, &call);
+			vbds_part_delete_srv(&call);
 			break;
 		case VBD_SUGGEST_PTYPE:
-			vbds_suggest_ptype_srv(chandle, &call);
+			vbds_suggest_ptype_srv(&call);
 			break;
 		default:
-			async_answer_0(chandle, EINVAL);
+			async_answer_0(&call, EINVAL);
 		}
 	}
 }
 
-static void vbds_client_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
+static void vbds_client_conn(ipc_call_t *icall, void *arg)
 {
 	service_id_t sid;
@@ -418,10 +418,10 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_client_conn()");
 
-	sid = (service_id_t)IPC_GET_ARG2(*icall);
+	sid = (service_id_t) IPC_GET_ARG2(*icall);
 
 	if (sid == ctl_sid)
-		vbds_ctl_conn(icall_handle, icall, arg);
+		vbds_ctl_conn(icall, arg);
 	else
-		vbds_bd_conn(icall_handle, icall, arg);
+		vbds_bd_conn(icall, arg);
 }
 
