Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -113,5 +113,6 @@
 	printf(NAME ": ATA disk driver\n");
 
-	printf("I/O address %p/%p\n", ctl_physical, cmd_physical);
+	printf("I/O address %p/%p\n", (void *) ctl_physical,
+	    (void *) cmd_physical);
 
 	if (ata_bd_init() != EOK)
@@ -181,5 +182,5 @@
 	}
 
-	printf(" %" PRIu64 " blocks", d->blocks, d->blocks / (2 * 1024));
+	printf(" %" PRIu64 " blocks", d->blocks);
 
 	mbytes = d->blocks / (2 * 1024);
Index: uspace/srv/bd/file_bd/file_bd.c
===================================================================
--- uspace/srv/bd/file_bd/file_bd.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/bd/file_bd/file_bd.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -56,5 +56,7 @@
 #define NAME "file_bd"
 
-static const size_t block_size = 512;
+#define DEFAULT_BLOCK_SIZE 512
+
+static size_t block_size;
 static aoff64_t num_blocks;
 static FILE *img;
@@ -63,4 +65,5 @@
 static fibril_mutex_t dev_lock;
 
+static void print_usage(void);
 static int file_bd_init(const char *fname);
 static void file_bd_connection(ipc_callid_t iid, ipc_call_t *icall);
@@ -71,20 +74,53 @@
 {
 	int rc;
+	char *image_name;
+	char *device_name;
 
 	printf(NAME ": File-backed block device driver\n");
 
-	if (argc != 3) {
-		printf("Expected two arguments (image name, device name).\n");
+	block_size = DEFAULT_BLOCK_SIZE;
+
+	++argv; --argc;
+	while (*argv != NULL && (*argv)[0] == '-') {
+		/* Option */
+		if (str_cmp(*argv, "-b") == 0) {
+			if (argc < 2) {
+				printf("Argument missing.\n");
+				print_usage();
+				return -1;
+			}
+
+			rc = str_size_t(argv[1], NULL, 10, true, &block_size);
+			if (rc != EOK || block_size == 0) {
+				printf("Invalid block size '%s'.\n", argv[1]);
+				print_usage();
+				return -1;
+			}
+			++argv; --argc;
+		} else {
+			printf("Invalid option '%s'.\n", *argv);
+			print_usage();
+			return -1;
+		}
+		++argv; --argc;
+	}
+
+	if (argc < 2) {
+		printf("Missing arguments.\n");
+		print_usage();
 		return -1;
 	}
 
-	if (file_bd_init(argv[1]) != EOK)
+	image_name = argv[0];
+	device_name = argv[1];
+
+	if (file_bd_init(image_name) != EOK)
 		return -1;
 
-	rc = devmap_device_register(argv[2], &devmap_handle);
+	rc = devmap_device_register(device_name, &devmap_handle);
 	if (rc != EOK) {
 		devmap_hangup_phone(DEVMAP_DRIVER);
-		printf(NAME ": Unable to register device %s.\n",
-			argv[2]);
+		printf(NAME ": Unable to register device '%s'.\n",
+			device_name);
 		return rc;
 	}
@@ -96,4 +132,9 @@
 	/* Not reached */
 	return 0;
+}
+
+static void print_usage(void)
+{
+	printf("Usage: " NAME " [-b <block_size>] <image_file> <device_name>\n");
 }
 
Index: uspace/srv/bd/part/guid_part/guid_part.c
===================================================================
--- uspace/srv/bd/part/guid_part/guid_part.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/bd/part/guid_part/guid_part.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -155,5 +155,5 @@
 
 	if (block_size < 512 || (block_size % 512) != 0) {
-		printf(NAME ": invalid block size %d.\n");
+		printf(NAME ": invalid block size %zu.\n", block_size);
 		return ENOTSUP;
 	}
Index: uspace/srv/bd/part/mbr_part/mbr_part.c
===================================================================
--- uspace/srv/bd/part/mbr_part/mbr_part.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/bd/part/mbr_part/mbr_part.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -206,5 +206,5 @@
 
 	if (block_size < 512 || (block_size % 512) != 0) {
-		printf(NAME ": invalid block size %d.\n");
+		printf(NAME ": invalid block size %zu.\n", block_size);
 		return ENOTSUP;
 	}
Index: uspace/srv/bd/rd/rd.c
===================================================================
--- uspace/srv/bd/rd/rd.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/bd/rd/rd.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -230,5 +230,6 @@
 	}
 	
-	printf("%s: Found RAM disk at %p, %d bytes\n", NAME, rd_ph_addr, rd_size);
+	printf("%s: Found RAM disk at %p, %zu bytes\n", NAME,
+	    (void *) rd_ph_addr, rd_size);
 	
 	int rc = devmap_driver_register(NAME, rd_connection);
Index: uspace/srv/clip/clip.c
===================================================================
--- uspace/srv/clip/clip.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/clip/clip.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -172,6 +172,5 @@
 			break;
 		default:
-			if (!(callid & IPC_CALLID_NOTIFICATION))
-				ipc_answer_0(callid, ENOENT);
+			ipc_answer_0(callid, ENOENT);
 		}
 	}
Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/devman/devman.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -1014,5 +1014,5 @@
 	
 	size_t idx = get_new_class_dev_idx(cl);
-	asprintf(&dev_name, "%s%d", base_name, idx);
+	asprintf(&dev_name, "%s%zu", base_name, idx);
 	
 	return dev_name;
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/devman/main.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -36,4 +36,5 @@
  */
 
+#include <inttypes.h>
 #include <assert.h>
 #include <ipc/services.h>
@@ -405,6 +406,5 @@
 			break;
 		default:
-			if (!(callid & IPC_CALLID_NOTIFICATION))
-				ipc_answer_0(callid, ENOENT);
+			ipc_answer_0(callid, ENOENT);
 		}
 	}
@@ -418,6 +418,6 @@
 	node_t *dev = find_dev_node(&device_tree, handle);
 	if (dev == NULL) {
-		printf(NAME ": devman_forward error - no device with handle %x "
-		    "was found.\n", handle);
+		printf(NAME ": devman_forward error - no device with handle %" PRIun
+		    " was found.\n", handle);
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -435,6 +435,6 @@
 	
 	if (driver == NULL) {
-		printf(NAME ": devman_forward error - the device is not in "
-		    "usable state.\n", handle);
+		printf(NAME ": devman_forward error - the device is not in %" PRIun
+		    " usable state.\n", handle);
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -450,5 +450,5 @@
 		printf(NAME ": devman_forward: cound not forward to driver %s ",
 		    driver->name);
-		printf("the driver's phone is %x).\n", driver->phone);
+		printf("the driver's phone is %" PRIun ").\n", driver->phone);
 		ipc_answer_0(iid, EINVAL);
 		return;
Index: uspace/srv/devmap/devmap.c
===================================================================
--- uspace/srv/devmap/devmap.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/devmap/devmap.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -555,5 +555,5 @@
 	if (devmap_device_find_name(namespace->name, device->name) != NULL) {
 		printf("%s: Device '%s/%s' already registered\n", NAME,
-		    device->namespace, device->name);
+		    device->namespace->name, device->name);
 		devmap_namespace_destroy(namespace);
 		fibril_mutex_unlock(&devices_list_mutex);
@@ -1052,6 +1052,5 @@
 			break;
 		default:
-			if (!(callid & IPC_CALLID_NOTIFICATION))
-				ipc_answer_0(callid, ENOENT);
+			ipc_answer_0(callid, ENOENT);
 		}
 	}
@@ -1111,6 +1110,5 @@
 			break;
 		default:
-			if (!(callid & IPC_CALLID_NOTIFICATION))
-				ipc_answer_0(callid, ENOENT);
+			ipc_answer_0(callid, ENOENT);
 		}
 	}
Index: uspace/srv/hid/console/console.c
===================================================================
--- uspace/srv/hid/console/console.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hid/console/console.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -804,5 +804,5 @@
 			if (screenbuffer_init(&consoles[i].scr,
 			    fb_info.cols, fb_info.rows) == NULL) {
-				printf(NAME ": Unable to allocate screen buffer %u\n", i);
+				printf(NAME ": Unable to allocate screen buffer %zu\n", i);
 				return false;
 			}
@@ -813,5 +813,5 @@
 			
 			char vc[DEVMAP_NAME_MAXLEN + 1];
-			snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%u", NAMESPACE, i);
+			snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i);
 			
 			if (devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {
Index: uspace/srv/hid/console/gcons.c
===================================================================
--- uspace/srv/hid/console/gcons.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hid/console/gcons.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -157,5 +157,5 @@
 		
 		char data[5];
-		snprintf(data, 5, "%u", index + 1);
+		snprintf(data, 5, "%zu", index + 1);
 		
 		size_t i;
Index: uspace/srv/hid/fb/serial_console.c
===================================================================
--- uspace/srv/hid/fb/serial_console.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hid/fb/serial_console.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -47,4 +47,5 @@
 #include <io/style.h>
 #include <str.h>
+#include <inttypes.h>
 #include <io/screenbuffer.h>
 
@@ -135,5 +136,6 @@
 	
 	char control[MAX_CONTROL];
-	snprintf(control, MAX_CONTROL, "\033[%u;%uf", row + 1, col + 1);
+	snprintf(control, MAX_CONTROL, "\033[%" PRIun ";%" PRIun "f",
+	    row + 1, col + 1);
 	serial_puts(control);
 }
@@ -253,5 +255,5 @@
 {
 	char control[MAX_CONTROL];
-	snprintf(control, MAX_CONTROL, "\033[0;%ur", last_row);
+	snprintf(control, MAX_CONTROL, "\033[0;%" PRIun "r", last_row);
 	serial_puts(control);
 }
Index: uspace/srv/hid/kbd/genarch/gsp.c
===================================================================
--- uspace/srv/hid/kbd/genarch/gsp.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hid/kbd/genarch/gsp.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -198,6 +198,6 @@
 	if (t == NULL) {
 		printf("gsp_step: not found\n");
-		*mods = NULL;
-		*key = NULL;
+		*mods = 0;
+		*key = 0;
 		return 0;
 	}
Index: uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
===================================================================
--- uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -50,4 +50,5 @@
 #include <sysinfo.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "s3c24xx_ts.h"
@@ -136,6 +137,6 @@
 	ts->last_y = 0;
 
-	printf(NAME ": device at physical address 0x%x, inr %d.\n",
-	    ts->paddr, inr);
+	printf(NAME ": device at physical address %p, inr %" PRIun ".\n",
+	    (void *) ts->paddr, inr);
 
 	async_set_interrupt_received(s3c24xx_ts_irq_handler);
Index: uspace/srv/hw/char/i8042/i8042.c
===================================================================
--- uspace/srv/hw/char/i8042/i8042.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/char/i8042/i8042.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -46,4 +46,5 @@
 #include <stdio.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "i8042.h"
@@ -201,5 +202,6 @@
 	ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);
 	ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);
-	printf("%s: registered for interrupts %d and %d\n", NAME, inr_a, inr_b);
+	printf("%s: registered for interrupts %" PRIun " and %" PRIun "\n",
+	    NAME, inr_a, inr_b);
 
 	wait_ready();
@@ -262,5 +264,5 @@
 			break;
 		case IPC_FIRST_USER_METHOD:
-			printf(NAME ": write %d to devid %d\n",
+			printf(NAME ": write %" PRIun " to devid %d\n",
 			    IPC_GET_ARG1(call), dev_id);
 			i8042_port_write(dev_id, IPC_GET_ARG1(call));
Index: uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
===================================================================
--- uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -48,4 +48,5 @@
 #include <sysinfo.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "s3c24xx_uart.h"
@@ -95,5 +96,6 @@
 	if (rc != EOK) {
 		devmap_hangup_phone(DEVMAP_DRIVER);
-		printf(NAME ": Unable to register device %s.\n");
+		printf(NAME ": Unable to register device %s.\n",
+		    NAMESPACE "/" NAME);
 		return -1;
 	}
@@ -134,5 +136,5 @@
 			break;
 		case CHAR_WRITE_BYTE:
-			printf(NAME ": write %d to device\n",
+			printf(NAME ": write %" PRIun " to device\n",
 			    IPC_GET_ARG1(call));
 			s3c24xx_uart_sendb(uart, (uint8_t) IPC_GET_ARG1(call));
@@ -185,6 +187,6 @@
 	uart->client_phone = -1;
 
-	printf(NAME ": device at physical address 0x%x, inr %d.\n",
-	    uart->paddr, inr);
+	printf(NAME ": device at physical address %p, inr %" PRIun ".\n",
+	    (void *) uart->paddr, inr);
 
 	async_set_interrupt_received(s3c24xx_uart_irq_handler);
Index: uspace/srv/hw/cir/fhc/fhc.c
===================================================================
--- uspace/srv/hw/cir/fhc/fhc.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/cir/fhc/fhc.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -129,5 +129,5 @@
 	}
 	
-	printf(NAME ": FHC UART registers at %p, %d bytes\n", fhc_uart_phys,
+	printf(NAME ": FHC UART registers at %p, %zu bytes\n", fhc_uart_phys,
 	    fhc_uart_size);
 	
Index: uspace/srv/hw/netif/dp8390/dp8390.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/netif/dp8390/dp8390.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -432,5 +432,5 @@
 	dep->de_write_iovec.iod_iovec[0].iov_size = size;
 	dep->de_write_iovec.iod_iovec_s = 1;
-	dep->de_write_iovec.iod_iovec_addr = NULL;
+	dep->de_write_iovec.iod_iovec_addr = (uintptr_t) NULL;
 
 	if (size < ETH_MIN_PACK_SIZE || size > ETH_MAX_PACK_SIZE_TAGGED)
@@ -1015,5 +1015,5 @@
 	dep->de_read_iovec.iod_iovec[0].iov_size = length;
 	dep->de_read_iovec.iod_iovec_s = 1;
-	dep->de_read_iovec.iod_iovec_addr = NULL;
+	dep->de_read_iovec.iod_iovec_addr = (uintptr_t) NULL;
 
 	last = page + (length - 1) / DP_PAGESIZE;
@@ -1516,6 +1516,6 @@
 	if (!wdeth_probe(dep) && !ne_probe(dep) && !el2_probe(dep))
 	{
-		printf("%s: No ethernet card found at 0x%x\n", 
-			dep->de_name, dep->de_base_port);
+		printf("%s: No ethernet card found at %#lx\n",
+		    dep->de_name, dep->de_base_port);
 		dep->de_mode= DEM_DISABLED;
 		return;
Index: uspace/srv/hw/netif/dp8390/dp8390_module.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -127,5 +127,5 @@
 		dep->received_count = 0;
 		fibril_rwlock_write_unlock(&netif_globals.lock);
-		nil_received_msg(phone, device_id, received, NULL);
+		nil_received_msg(phone, device_id, received, SERVICE_NONE);
 	}else{
 		fibril_rwlock_write_unlock(&netif_globals.lock);
Index: uspace/srv/hw/netif/dp8390/ne2000.c
===================================================================
--- uspace/srv/hw/netif/dp8390/ne2000.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/hw/netif/dp8390/ne2000.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -267,14 +267,14 @@
 	if (!debug)
 	{
-		printf("%s: NE%d000 at %X:%d\n",
-			dep->de_name, dep->de_16bit ? 2 : 1,
-			dep->de_base_port, dep->de_irq);
+		printf("%s: NE%d000 at %#lx:%d\n",
+		    dep->de_name, dep->de_16bit ? 2 : 1,
+		    dep->de_base_port, dep->de_irq);
 	}
 	else
 	{
 		printf("%s: Novell NE%d000 ethernet card at I/O address "
-			"0x%X, memory size 0x%X, irq %d\n",
-			dep->de_name, dep->de_16bit ? 2 : 1,
-			dep->de_base_port, dep->de_ramsize, dep->de_irq);
+		    "%#lx, memory size %#lx, irq %d\n",
+		    dep->de_name, dep->de_16bit ? 2 : 1,
+		    dep->de_base_port, dep->de_ramsize, dep->de_irq);
 	}
 }
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/loader/main.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -411,6 +411,5 @@
 			break;
 		}
-		if ((callid & IPC_CALLID_NOTIFICATION) == 0 &&
-		    IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) {
+		if (IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) {
 			DPRINTF("Responding EINVAL to method %d.\n",
 			    IPC_GET_METHOD(call));
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/net/il/arp/arp.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -421,5 +421,5 @@
 	device->packet_dimension.content = mtu;
 	fibril_mutex_unlock(&arp_globals.lock);
-	printf("arp - device %d changed mtu to %d\n\n", device_id, mtu);
+	printf("arp - device %d changed mtu to %zu\n\n", device_id, mtu);
 	return EOK;
 }
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/net/il/ip/ip.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -461,5 +461,5 @@
 	
 	if (ip_netif->packet_dimension.content < IP_MIN_CONTENT) {
-		printf("Maximum transmission unit %d bytes is too small, at "
+		printf("Maximum transmission unit %zu bytes is too small, at "
 		    "least %d bytes are needed\n",
 		    ip_netif->packet_dimension.content, IP_MIN_CONTENT);
@@ -502,5 +502,5 @@
 	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
 
-	printf("%s: Device %d changed MTU to %d\n", NAME, device_id, mtu);
+	printf("%s: Device %d changed MTU to %zu\n", NAME, device_id, mtu);
 
 	return EOK;
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/net/nil/eth/eth.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -315,5 +315,5 @@
 			device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
 		
-		printf("Device %d already exists:\tMTU\t= %d\n",
+		printf("Device %d already exists:\tMTU\t= %zu\n",
 		    device->device_id, device->mtu);
 		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
@@ -407,5 +407,5 @@
 	}
 	
-	printf("%s: Device registered (id: %d, service: %d: mtu: %d, "
+	printf("%s: Device registered (id: %d, service: %d: mtu: %zu, "
 	    "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n",
 	    NAME, device->device_id, device->service, device->mtu,
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -175,5 +175,5 @@
 			device->mtu = NET_DEFAULT_MTU;
 		
-		printf("Device %d already exists:\tMTU\t= %d\n",
+		printf("Device %d already exists:\tMTU\t= %zu\n",
 		    device->device_id, device->mtu);
 		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
@@ -232,5 +232,5 @@
 	}
 	
-	printf("%s: Device registered (id: %d, service: %d, mtu: %d)\n",
+	printf("%s: Device registered (id: %d, service: %d, mtu: %zu)\n",
 	    NAME, device->device_id, device->service, device->mtu);
 	fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
Index: uspace/srv/ns/task.c
===================================================================
--- uspace/srv/ns/task.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/ns/task.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -262,6 +262,6 @@
 	if (ht == NULL) {
 		/* No such task exists. */
-		retval = ENOENT;
-		goto out;
+		ipc_answer_0(callid, ENOENT);
+		return;
 	}
 
Index: uspace/srv/taskmon/taskmon.c
===================================================================
--- uspace/srv/taskmon/taskmon.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/taskmon/taskmon.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -60,10 +60,11 @@
 	thread = IPC_GET_ARG3(*call);
 
-	if (asprintf(&s_taskid, "%" PRIuTASKID, taskid) < 0) {
+	if (asprintf(&s_taskid, "%" PRIu64, taskid) < 0) {
 		printf("Memory allocation failed.\n");
 		return;
 	}
 
-	printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread);
+	printf(NAME ": Task %" PRIu64 " fault in thread %p.\n", taskid,
+	    (void *) thread);
 
 	fname = "/app/taskdump";
@@ -72,14 +73,14 @@
 	char *dump_fname;
 
-	if (asprintf(&dump_fname, "/data/core%" PRIuTASKID, taskid) < 0) {
+	if (asprintf(&dump_fname, "/data/core%" PRIu64, taskid) < 0) {
 		printf("Memory allocation failed.\n");
 		return;
 	}
 
-	printf(NAME ": Executing %s -c %s -t %s\n", dump_fname, s_taskid);
+	printf(NAME ": Executing %s -c %s -t %s\n", fname, dump_fname, s_taskid);
 	rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid,
 	    NULL);
 #else
-	printf(NAME ": Executing %s -t %s\n", s_taskid);
+	printf(NAME ": Executing %s -t %s\n", fname, s_taskid);
 	rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL);
 #endif
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 8e58f94f991577868c96308f786bce7e2d1508f6)
+++ uspace/srv/vfs/vfs_ops.c	(revision bea023b9b8202ba19f790a340e59e36be213fadf)
@@ -55,5 +55,6 @@
 
 /* Forward declarations of static functions. */
-static int vfs_truncate_internal(fs_handle_t, devmap_handle_t, fs_index_t, aoff64_t);
+static int vfs_truncate_internal(fs_handle_t, devmap_handle_t, fs_index_t,
+    aoff64_t);
 
 /**
@@ -250,4 +251,6 @@
 void vfs_mount(ipc_callid_t rid, ipc_call_t *request)
 {
+	devmap_handle_t devmap_handle;
+
 	/*
 	 * We expect the library to do the device-name to device-handle
@@ -255,5 +258,5 @@
 	 * in the request.
 	 */
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
+	devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
 	
 	/*
@@ -291,6 +294,6 @@
 	 */
 	char *fs_name;
-	rc = async_data_write_accept((void **) &fs_name, true, 0, FS_NAME_MAXLEN,
-	    0, NULL);
+	rc = async_data_write_accept((void **) &fs_name, true, 0,
+	    FS_NAME_MAXLEN, 0, NULL);
 	if (rc != EOK) {
 		free(mp);
@@ -458,6 +461,6 @@
 
 		phone = vfs_grab_phone(mp_node->fs_handle);
-		rc = async_req_2_0(phone, VFS_OUT_UNMOUNT, mp_node->devmap_handle,
-		    mp_node->index);
+		rc = async_req_2_0(phone, VFS_OUT_UNMOUNT,
+		    mp_node->devmap_handle, mp_node->index);
 		vfs_release_phone(mp_node->fs_handle, phone);
 		if (rc != EOK) {
@@ -740,6 +743,6 @@
 		aid_t msg;
 		ipc_call_t answer;
-		msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->devmap_handle,
-		    file->node->index, &answer);
+		msg = async_send_2(fs_phone, VFS_OUT_CLOSE,
+		    file->node->devmap_handle, file->node->index, &answer);
 		
 		/* Wait for reply from the FS server. */
@@ -834,11 +837,11 @@
 	ipc_call_t answer;
 	if (read) {
-		if (file->append)
-			file->pos = file->node->size;
-		
 		rc = async_data_read_forward_3_1(fs_phone, VFS_OUT_READ,
 		    file->node->devmap_handle, file->node->index, file->pos,
 		    &answer);
 	} else {
+		if (file->append)
+			file->pos = file->node->size;
+		
 		rc = async_data_write_forward_3_1(fs_phone, VFS_OUT_WRITE,
 		    file->node->devmap_handle, file->node->index, file->pos,
@@ -888,6 +891,6 @@
 {
 	int fd = (int) IPC_GET_ARG1(*request);
-	off64_t off =
-	    (off64_t) MERGE_LOUP32(IPC_GET_ARG2(*request), IPC_GET_ARG3(*request));
+	off64_t off = (off64_t) MERGE_LOUP32(IPC_GET_ARG2(*request),
+	    IPC_GET_ARG3(*request));
 	int whence = (int) IPC_GET_ARG4(*request);
 	
@@ -903,56 +906,57 @@
 	off64_t newoff;
 	switch (whence) {
-		case SEEK_SET:
-			if (off >= 0) {
-				file->pos = (aoff64_t) off;
-				fibril_mutex_unlock(&file->lock);
-				ipc_answer_1(rid, EOK, off);
-				return;
-			}
-			break;
-		case SEEK_CUR:
-			if ((off >= 0) && (file->pos + off < file->pos)) {
-				fibril_mutex_unlock(&file->lock);
-				ipc_answer_0(rid, EOVERFLOW);
-				return;
-			}
-			
-			if ((off < 0) && (file->pos < (aoff64_t) -off)) {
-				fibril_mutex_unlock(&file->lock);
-				ipc_answer_0(rid, EOVERFLOW);
-				return;
-			}
-			
-			file->pos += off;
-			newoff = (file->pos > OFF64_MAX) ? OFF64_MAX : file->pos;
-			
+	case SEEK_SET:
+		if (off >= 0) {
+			file->pos = (aoff64_t) off;
 			fibril_mutex_unlock(&file->lock);
-			ipc_answer_2(rid, EOK, LOWER32(newoff), UPPER32(newoff));
-			return;
-		case SEEK_END:
-			fibril_rwlock_read_lock(&file->node->contents_rwlock);
-			aoff64_t size = file->node->size;
-			
-			if ((off >= 0) && (size + off < size)) {
-				fibril_rwlock_read_unlock(&file->node->contents_rwlock);
-				fibril_mutex_unlock(&file->lock);
-				ipc_answer_0(rid, EOVERFLOW);
-				return;
-			}
-			
-			if ((off < 0) && (size < (aoff64_t) -off)) {
-				fibril_rwlock_read_unlock(&file->node->contents_rwlock);
-				fibril_mutex_unlock(&file->lock);
-				ipc_answer_0(rid, EOVERFLOW);
-				return;
-			}
-			
-			file->pos = size + off;
-			newoff = (file->pos > OFF64_MAX) ? OFF64_MAX : file->pos;
-			
+			ipc_answer_1(rid, EOK, off);
+			return;
+		}
+		break;
+	case SEEK_CUR:
+		if ((off >= 0) && (file->pos + off < file->pos)) {
+			fibril_mutex_unlock(&file->lock);
+			ipc_answer_0(rid, EOVERFLOW);
+			return;
+		}
+		
+		if ((off < 0) && (file->pos < (aoff64_t) -off)) {
+			fibril_mutex_unlock(&file->lock);
+			ipc_answer_0(rid, EOVERFLOW);
+			return;
+		}
+		
+		file->pos += off;
+		newoff = (file->pos > OFF64_MAX) ?  OFF64_MAX : file->pos;
+		
+		fibril_mutex_unlock(&file->lock);
+		ipc_answer_2(rid, EOK, LOWER32(newoff),
+		    UPPER32(newoff));
+		return;
+	case SEEK_END:
+		fibril_rwlock_read_lock(&file->node->contents_rwlock);
+		aoff64_t size = file->node->size;
+		
+		if ((off >= 0) && (size + off < size)) {
 			fibril_rwlock_read_unlock(&file->node->contents_rwlock);
 			fibril_mutex_unlock(&file->lock);
-			ipc_answer_2(rid, EOK, LOWER32(newoff), UPPER32(newoff));
-			return;
+			ipc_answer_0(rid, EOVERFLOW);
+			return;
+		}
+		
+		if ((off < 0) && (size < (aoff64_t) -off)) {
+			fibril_rwlock_read_unlock(&file->node->contents_rwlock);
+			fibril_mutex_unlock(&file->lock);
+			ipc_answer_0(rid, EOVERFLOW);
+			return;
+		}
+		
+		file->pos = size + off;
+		newoff = (file->pos > OFF64_MAX) ?  OFF64_MAX : file->pos;
+		
+		fibril_rwlock_read_unlock(&file->node->contents_rwlock);
+		fibril_mutex_unlock(&file->lock);
+		ipc_answer_2(rid, EOK, LOWER32(newoff), UPPER32(newoff));
+		return;
 	}
 	
@@ -977,6 +981,6 @@
 {
 	int fd = IPC_GET_ARG1(*request);
-	aoff64_t size =
-	    (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(*request), IPC_GET_ARG3(*request));
+	aoff64_t size = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(*request),
+	    IPC_GET_ARG3(*request));
 	int rc;
 
