Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision f3025861da728fb4754f9d1cdcfeda5675ac98f3)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision e1e419242301f0e2f9fde5702b684ea76aedd876)
@@ -191,5 +191,5 @@
 	}
 
-	printf(NAME ": Accepting connections\n");
+	printf("%s: Accepting connections\n", NAME);
 	task_retval(0);
 	async_manager();
@@ -243,31 +243,28 @@
 static int ata_bd_init(void)
 {
+	async_set_client_connection(ata_bd_connection);
+	int rc = loc_server_register(NAME);
+	if (rc != EOK) {
+		printf("%s: Unable to register driver.\n", NAME);
+		return rc;
+	}
+	
 	void *vaddr;
-	int rc;
-	
-	async_set_client_connection(ata_bd_connection);
-	rc = loc_server_register(NAME);
-	if (rc < 0) {
-		printf(NAME ": Unable to register driver.\n");
-		return rc;
-	}
-
 	rc = pio_enable((void *) cmd_physical, sizeof(ata_cmd_t), &vaddr);
 	if (rc != EOK) {
-		printf(NAME ": Could not initialize device I/O space.\n");
+		printf("%s: Could not initialize device I/O space.\n", NAME);
 		return rc;
 	}
-
+	
 	cmd = vaddr;
-
+	
 	rc = pio_enable((void *) ctl_physical, sizeof(ata_ctl_t), &vaddr);
 	if (rc != EOK) {
-		printf(NAME ": Could not initialize device I/O space.\n");
+		printf("%s: Could not initialize device I/O space.\n", NAME);
 		return rc;
 	}
-
+	
 	ctl = vaddr;
-
-
+	
 	return EOK;
 }
Index: uspace/srv/bd/file_bd/file_bd.c
===================================================================
--- uspace/srv/bd/file_bd/file_bd.c	(revision f3025861da728fb4754f9d1cdcfeda5675ac98f3)
+++ uspace/srv/bd/file_bd/file_bd.c	(revision e1e419242301f0e2f9fde5702b684ea76aedd876)
@@ -119,13 +119,13 @@
 	rc = loc_service_register(device_name, &service_id);
 	if (rc != EOK) {
-		printf(NAME ": Unable to register device '%s'.\n",
-			device_name);
+		printf("%s: Unable to register device '%s'.\n",
+		    NAME, device_name);
 		return rc;
 	}
-
-	printf(NAME ": Accepting connections\n");
+	
+	printf("%s: Accepting connections\n", NAME);
 	task_retval(0);
 	async_manager();
-
+	
 	/* Not reached */
 	return 0;
@@ -139,33 +139,30 @@
 static int file_bd_init(const char *fname)
 {
-	int rc;
-	long img_size;
-	
 	async_set_client_connection(file_bd_connection);
-	rc = loc_server_register(NAME);
-	if (rc < 0) {
-		printf(NAME ": Unable to register driver.\n");
+	int rc = loc_server_register(NAME);
+	if (rc != EOK) {
+		printf("%s: Unable to register driver.\n", NAME);
 		return rc;
 	}
-
+	
 	img = fopen(fname, "rb+");
 	if (img == NULL)
 		return EINVAL;
-
+	
 	if (fseek(img, 0, SEEK_END) != 0) {
 		fclose(img);
 		return EIO;
 	}
-
-	img_size = ftell(img);
+	
+	off64_t img_size = ftell(img);
 	if (img_size < 0) {
 		fclose(img);
 		return EIO;
 	}
-
+	
 	num_blocks = img_size / block_size;
-
+	
 	fibril_mutex_initialize(&dev_lock);
-
+	
 	return EOK;
 }
Index: uspace/srv/bd/gxe_bd/gxe_bd.c
===================================================================
--- uspace/srv/bd/gxe_bd/gxe_bd.c	(revision f3025861da728fb4754f9d1cdcfeda5675ac98f3)
+++ uspace/srv/bd/gxe_bd/gxe_bd.c	(revision e1e419242301f0e2f9fde5702b684ea76aedd876)
@@ -122,33 +122,34 @@
 static int gxe_bd_init(void)
 {
+	async_set_client_connection(gxe_bd_connection);
+	int rc = loc_server_register(NAME);
+	if (rc != EOK) {
+		printf("%s: Unable to register driver.\n", NAME);
+		return rc;
+	}
+	
 	void *vaddr;
-	int rc, i;
-	char name[16];
-	
-	async_set_client_connection(gxe_bd_connection);
-	rc = loc_server_register(NAME);
-	if (rc < 0) {
-		printf(NAME ": Unable to register driver.\n");
-		return rc;
-	}
-
 	rc = pio_enable((void *) dev_physical, sizeof(gxe_bd_t), &vaddr);
 	if (rc != EOK) {
-		printf(NAME ": Could not initialize device I/O space.\n");
+		printf("%s: Could not initialize device I/O space.\n", NAME);
 		return rc;
 	}
-
+	
 	dev = vaddr;
-
-	for (i = 0; i < MAX_DISKS; i++) {
-		snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
+	
+	for (unsigned int i = 0; i < MAX_DISKS; i++) {
+		char name[16];
+		
+		snprintf(name, 16, "%s/disk%u", NAMESPACE, i);
 		rc = loc_service_register(name, &service_id[i]);
 		if (rc != EOK) {
-			printf(NAME ": Unable to register device %s.\n", name);
+			printf("%s: Unable to register device %s.\n", NAME,
+			    name);
 			return rc;
 		}
+		
 		fibril_mutex_initialize(&dev_lock[i]);
 	}
-
+	
 	return EOK;
 }
Index: uspace/srv/bd/part/guid_part/guid_part.c
===================================================================
--- uspace/srv/bd/part/guid_part/guid_part.c	(revision f3025861da728fb4754f9d1cdcfeda5675ac98f3)
+++ uspace/srv/bd/part/guid_part/guid_part.c	(revision e1e419242301f0e2f9fde5702b684ea76aedd876)
@@ -170,5 +170,5 @@
 		return rc;
 	}
-
+	
 	/*
 	 * Create partition devices.
Index: uspace/srv/bd/rd/rd.c
===================================================================
--- uspace/srv/bd/rd/rd.c	(revision f3025861da728fb4754f9d1cdcfeda5675ac98f3)
+++ uspace/srv/bd/rd/rd.c	(revision e1e419242301f0e2f9fde5702b684ea76aedd876)
@@ -237,5 +237,5 @@
 	async_set_client_connection(rd_connection);
 	ret = loc_server_register(NAME);
-	if (ret < 0) {
+	if (ret != EOK) {
 		printf("%s: Unable to register driver (%d)\n", NAME, ret);
 		return false;
