Index: uspace/srv/devmap/devmap.c
===================================================================
--- uspace/srv/devmap/devmap.c	(revision 7f3e3e7cd28edb10703225d94b18bb1004b9c570)
+++ uspace/srv/devmap/devmap.c	(revision 8498915fcb2cf4aa2a0cc399866d4191c963b740)
@@ -114,5 +114,5 @@
 
 	if (item == &devices_list) {
-		printf("DevMap: no device named %s.\n", name);
+		printf("DEVMAP: no device named %s.\n", name);
 		return NULL;
 	}
@@ -190,5 +190,5 @@
 
 	if (IPC_GET_METHOD(icall) != DEVMAP_DRIVER_REGISTER) {
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	} 
@@ -196,5 +196,5 @@
 	if (NULL ==
 	    (driver = (devmap_driver_t *)malloc(sizeof(devmap_driver_t)))) {
-		ipc_answer_fast(iid, ENOMEM, 0, 0);
+		ipc_answer_0(iid, ENOMEM);
 		return;
 	}
@@ -203,9 +203,9 @@
 	 * Get driver name
 	 */
-	if (!ipc_data_receive(&callid, &call, NULL, &name_size)) {
-		printf("Unexpected request: %u.\n", IPC_GET_METHOD(call));
+	if (!ipc_data_receive(&callid, NULL, &name_size)) {
+		printf("Unexpected request.\n");
 		free(driver);
-		ipc_answer_fast(callid, EREFUSED, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, EREFUSED);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -215,6 +215,6 @@
 		    DEVMAP_NAME_MAXLEN);
 		free(driver);
-		ipc_answer_fast(callid, EINVAL, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -226,6 +226,6 @@
 		printf("Cannot allocate space for driver name.\n");
 		free(driver);
-		ipc_answer_fast(callid, ENOMEM, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, ENOMEM);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}	
@@ -234,9 +234,9 @@
 	 * Send confirmation to sender and get data into buffer.
 	 */
-	if (EOK != ipc_data_deliver(callid, &call, driver->name, name_size)) {
+	if (EOK != ipc_data_deliver(callid, driver->name, name_size)) {
 		printf("Cannot read driver name.\n");
 		free(driver->name);
 		free(driver);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -251,5 +251,5 @@
 	/* 
 	 * Initialize list of asociated devices
-     */
+	 */
 	list_initialize(&(driver->devices));
 
@@ -260,11 +260,11 @@
 
 	if (IPC_M_CONNECT_TO_ME != IPC_GET_METHOD(call)) {
-		printf("DevMap: Unexpected method: %u.\n",
+		printf("DEVMAP: Unexpected method: %u.\n",
 		    IPC_GET_METHOD(call));
-		ipc_answer_fast(callid, ENOTSUP, 0, 0);
+		ipc_answer_0(callid, ENOTSUP);
 		
 		free(driver->name);
 		free(driver);
-		ipc_answer_fast(iid, ENOTSUP, 0, 0);
+		ipc_answer_0(iid, ENOTSUP);
 		return;
 	}
@@ -272,5 +272,5 @@
 	driver->phone = IPC_GET_ARG3(call);
 	
-	ipc_answer_fast(callid, EOK, 0, 0);
+	ipc_answer_0(callid, EOK);
 	
 	list_initialize(&(driver->drivers));
@@ -288,5 +288,5 @@
 	futex_up(&drivers_list_futex);	
 	
-	ipc_answer_fast(iid, EOK, 0, 0);
+	ipc_answer_0(iid, EOK);
 	printf("Driver registered.\n");
 
@@ -295,6 +295,6 @@
 }
 
-/** Unregister device driver, unregister all its devices and free driver structure.
- *
+/** Unregister device driver, unregister all its devices and free driver
+ * structure.
  */
 static int devmap_driver_unregister(devmap_driver_t *driver)
@@ -348,8 +348,7 @@
  */
 static void devmap_device_register(ipc_callid_t iid, ipc_call_t *icall,
-		devmap_driver_t *driver)
+    devmap_driver_t *driver)
 {
 	ipc_callid_t callid;
-	ipc_call_t call;
 	size_t size;
 	devmap_device_t *device;
@@ -357,5 +356,5 @@
 	if (NULL == driver) {
 		printf("Invalid driver registration.\n");
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -365,13 +364,13 @@
 	    (device = (devmap_device_t *)malloc(sizeof(devmap_device_t)))) {
 		printf("Cannot allocate new device.\n");
-		ipc_answer_fast(iid, ENOMEM, 0, 0);
+		ipc_answer_0(iid, ENOMEM);
 		return;
 	}
 	
 	/* Get device name */
-	if (!ipc_data_receive(&callid, &call, NULL, &size)) {
+	if (!ipc_data_receive(&callid, NULL, &size)) {
 		free(device);
 		printf("Cannot read device name.\n");
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -380,6 +379,6 @@
 		printf("Too long device name: %u.\n", size);
 		free(device);
-		ipc_answer_fast(callid, EINVAL, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -391,10 +390,10 @@
 		printf("Cannot read device name.\n");
 		free(device);
-		ipc_answer_fast(callid, ENOMEM, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
-		return;
-	}
-	
-	ipc_data_deliver(callid, &call, device->name, size);
+		ipc_answer_0(callid, ENOMEM);
+		ipc_answer_0(iid, EREFUSED);
+		return;
+	}
+	
+	ipc_data_deliver(callid, device->name, size);
 	device->name[size] = 0;
 
@@ -410,5 +409,5 @@
 		free(device->name);
 		free(device);
-		ipc_answer_fast(iid, EEXISTS, 0, 0);
+		ipc_answer_0(iid, EEXISTS);
 		return;
 	}
@@ -420,16 +419,16 @@
 	
 	/* Insert device into list of all devices  */
-	list_append(&(device->devices), &devices_list);
+	list_append(&device->devices, &devices_list);
 
 	/* Insert device into list of devices that belog to one driver */
-	futex_down(&(device->driver->devices_futex));	
-	
-	list_append(&(device->driver_devices), &(device->driver->devices));
-	
-	futex_up(&(device->driver->devices_futex));	
+	futex_down(&device->driver->devices_futex);	
+	
+	list_append(&device->driver_devices, &device->driver->devices);
+	
+	futex_up(&device->driver->devices_futex);	
 	futex_up(&devices_list_futex);	
 
 	printf("Device '%s' registered.\n", device->name);	
-	ipc_answer_fast(iid, EOK, device->handle, 0);
+	ipc_answer_1(iid, EOK, device->handle);
 
 	return;
@@ -440,5 +439,5 @@
  */
 static int devmap_device_unregister(ipc_callid_t iid, ipc_call_t *icall, 
-	devmap_driver_t *driver)
+    devmap_driver_t *driver)
 {
 	/* TODO */
@@ -465,7 +464,7 @@
 
 	if (NULL == dev) {
-		printf("DevMap: No registered device with handle %d.\n",
+		printf("DEVMAP: No registered device with handle %d.\n",
 		    handle);
-		ipc_answer_fast(callid, ENOENT, 0, 0);
+		ipc_answer_0(callid, ENOENT);
 		return;
 	} 
@@ -487,5 +486,4 @@
 	const devmap_device_t *dev;
 	ipc_callid_t callid;
-	ipc_call_t call;
 	ipcarg_t retval;
 	
@@ -495,13 +493,13 @@
 	 * read the name itself until the buffer is allocated).
 	 */
-	if (!ipc_data_receive(&callid, &call, NULL, &name_size)) {
-		ipc_answer_fast(callid, EREFUSED, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+	if (!ipc_data_receive(&callid, NULL, &name_size)) {
+		ipc_answer_0(callid, EREFUSED);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
 
 	if (name_size > DEVMAP_NAME_MAXLEN) {
-		ipc_answer_fast(callid, EINVAL, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -511,6 +509,6 @@
 	 */
 	if (NULL == (name = (char *)malloc(name_size))) {
-		ipc_answer_fast(callid, ENOMEM, 0, 0);
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+		ipc_answer_0(callid, ENOMEM);
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}	
@@ -519,7 +517,6 @@
 	 * Send confirmation to sender and get data into buffer.
 	 */
-	if (EOK != (retval = ipc_data_deliver(callid, &call, name,
-	    name_size))) {
-		ipc_answer_fast(iid, EREFUSED, 0, 0);
+	if (EOK != (retval = ipc_data_deliver(callid, name, name_size))) {
+		ipc_answer_0(iid, EREFUSED);
 		return;
 	}
@@ -534,12 +531,12 @@
 	 */
 	if (NULL == dev) {
-		printf("DevMap: device %s has not been registered.\n", name);
-		ipc_answer_fast(iid, ENOENT, 0, 0);
-		return;
-	}
-
-	printf("DevMap: device %s has handler %d.\n", name, dev->handle);
+		printf("DEVMAP: device %s has not been registered.\n", name);
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+
+	printf("DEVMAP: device %s has handler %d.\n", name, dev->handle);
 		
-	ipc_answer_fast(iid, EOK, dev->handle, 0);
+	ipc_answer_1(iid, EOK, dev->handle);
 
 	return;
@@ -560,9 +557,9 @@
 	 */
 	if (NULL == device) {
-		ipc_answer_fast(iid, ENOENT, 0, 0);
+		ipc_answer_0(iid, ENOENT);
 		return;
 	}	
 
-	ipc_answer_fast(iid, EOK, 0, 0);
+	ipc_answer_0(iid, EOK);
 
 	name_size = strlen(device->name);
@@ -570,5 +567,5 @@
 
 /*	FIXME:
-	we have no channel from DevMap to client -> 
+	we have no channel from DEVMAP to client -> 
 	sending must be initiated by client
 
@@ -595,10 +592,10 @@
 	devmap_driver_t *driver = NULL; 
 
-	ipc_answer_fast(iid, EOK, 0, 0); 
+	ipc_answer_0(iid, EOK); 
 
 	devmap_driver_register(&driver);
 
 	if (NULL == driver) {
-		printf("DevMap: driver registration failed.\n");
+		printf("DEVMAP: driver registration failed.\n");
 		return;
 	}
@@ -609,14 +606,14 @@
  		switch (IPC_GET_METHOD(call)) {
 		case IPC_M_PHONE_HUNGUP:
-			printf("DevMap: connection hung up.\n");
+			printf("DEVMAP: connection hung up.\n");
 			cont = false;
 			continue; /* Exit thread */
 		case DEVMAP_DRIVER_UNREGISTER:
-			printf("DevMap: unregister driver.\n");
+			printf("DEVMAP: unregister driver.\n");
 			if (NULL == driver) {
-				printf("DevMap: driver was not registered!\n");
-				ipc_answer_fast(callid, ENOENT, 0, 0);
+				printf("DEVMAP: driver was not registered!\n");
+				ipc_answer_0(callid, ENOENT);
 			} else {
-				ipc_answer_fast(callid, EOK, 0, 0);
+				ipc_answer_0(callid, EOK);
 			}
 			break;
@@ -637,5 +634,5 @@
 		default:
 			if (!(callid & IPC_CALLID_NOTIFICATION)) {
-				ipc_answer_fast(callid, ENOENT, 0, 0);
+				ipc_answer_0(callid, ENOENT);
 			}
 		}
@@ -643,7 +640,7 @@
 	
 	if (NULL != driver) {
-			/* 
-			 * Unregister the device driver and all its devices.
-			 */
+		/* 
+		 * Unregister the device driver and all its devices.
+		 */
 		devmap_driver_unregister(driver);
 		driver = NULL;
@@ -662,5 +659,5 @@
 	bool cont = true;
 
-	ipc_answer_fast(iid, EOK, 0, 0); /* Accept connection */
+	ipc_answer_0(iid, EOK); /* Accept connection */
 
 	while (cont) {
@@ -669,5 +666,5 @@
  		switch (IPC_GET_METHOD(call)) {
 		case IPC_M_PHONE_HUNGUP:
-			printf("DevMap: connection hung up.\n");
+			printf("DEVMAP: connection hung up.\n");
 			cont = false;
 			continue; /* Exit thread */
@@ -675,5 +672,5 @@
 		case DEVMAP_DEVICE_CONNECT_ME_TO:
 			/* Connect client to selected device */
-			printf("DevMap: connect to device %d.\n",
+			printf("DEVMAP: connect to device %d.\n",
 			    IPC_GET_ARG1(call));
 			devmap_forward(callid, &call);
@@ -690,5 +687,5 @@
 		default:
 			if (!(callid & IPC_CALLID_NOTIFICATION)) {
-				ipc_answer_fast(callid, ENOENT, 0, 0);
+				ipc_answer_0(callid, ENOENT);
 			}
 		}
@@ -703,5 +700,5 @@
 {
 
-	printf("DevMap: new connection.\n");
+	printf("DEVMAP: new connection.\n");
 
 		/* Select interface */
@@ -714,6 +711,6 @@
 		break;
 	default:
-		ipc_answer_fast(iid, ENOENT, 0, 0); /* No such interface */
-		printf("DevMap: Unknown interface %u.\n",
+		ipc_answer_0(iid, ENOENT); /* No such interface */
+		printf("DEVMAP: Unknown interface %u.\n",
 		    (ipcarg_t)(IPC_GET_ARG1(*icall)));
 	}
@@ -721,5 +718,5 @@
 	/* Cleanup */
 	
-	printf("DevMap: connection closed.\n");
+	printf("DEVMAP: connection closed.\n");
 	return;
 }
@@ -732,8 +729,8 @@
 	ipcarg_t phonead;
 
-	printf("DevMap: HelenOS device mapper.\n");
+	printf("DEVMAP: HelenOS device mapper.\n");
 
 	if (devmap_init() != 0) {
-		printf("Error while initializing DevMap service.\n");
+		printf("Error while initializing DEVMAP service.\n");
 		return -1;
 	}
