diff --git a/cmd/ide.c b/cmd/ide.c
index 06202c5..01b91b5 100644
--- a/cmd/ide.c
+++ b/cmd/ide.c
@@ -137,7 +137,7 @@
 					++ok;
 					if (dev)
 						putc('\n');
-					print_part(&ide_dev_desc[dev]);
+					part_print(&ide_dev_desc[dev]);
 				}
 			}
 			if (!ok) {
@@ -171,7 +171,7 @@
 			int dev = (int) simple_strtoul(argv[2], NULL, 10);
 
 			if (ide_dev_desc[dev].part_type != PART_TYPE_UNKNOWN) {
-				print_part(&ide_dev_desc[dev]);
+				part_print(&ide_dev_desc[dev]);
 			} else {
 				printf("\nIDE device %d not available\n",
 				       dev);
@@ -435,7 +435,7 @@
 
 		if ((ide_dev_desc[i].lba > 0) && (ide_dev_desc[i].blksz > 0)) {
 			/* initialize partition type */
-			init_part(&ide_dev_desc[i]);
+			part_init(&ide_dev_desc[i]);
 			if (curr_device < 0)
 				curr_device = i;
 		}
diff --git a/cmd/mmc.c b/cmd/mmc.c
index ab59e7f..fb4382e 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -433,7 +433,7 @@
 
 	mmc_dev = mmc_get_dev(curr_device);
 	if (mmc_dev != NULL && mmc_dev->type != DEV_TYPE_UNKNOWN) {
-		print_part(mmc_dev);
+		part_print(mmc_dev);
 		return CMD_RET_SUCCESS;
 	}
 
diff --git a/cmd/part.c b/cmd/part.c
index 415b38a..414031e 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -92,7 +92,7 @@
 
 		for (p = 1; p < 128; p++) {
 			char t[5];
-			int r = get_partition_info(desc, p, &info);
+			int r = part_get_info(desc, p, &info);
 
 			if (r != 0)
 				continue;
@@ -107,7 +107,7 @@
 		return 0;
 	}
 
-	print_part(desc);
+	part_print(desc);
 
 	return 0;
 }
@@ -132,7 +132,7 @@
 	if (ret < 0)
 		return 1;
 
-	err = get_partition_info(desc, part, &info);
+	err = part_get_info(desc, part, &info);
 	if (err)
 		return 1;
 
@@ -166,7 +166,7 @@
 	if (ret < 0)
 		return 1;
 
-	err = get_partition_info(desc, part, &info);
+	err = part_get_info(desc, part, &info);
 	if (err)
 		return 1;
 
diff --git a/cmd/read.c b/cmd/read.c
index 12ac165..f8d766a 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -50,7 +50,7 @@
 	cnt = simple_strtoul(argv[5], NULL, 16);
 
 	if (part != 0) {
-		if (get_partition_info(dev_desc, part, &part_info)) {
+		if (part_get_info(dev_desc, part, &part_info)) {
 			printf("Cannot find partition %d\n", part);
 			return 1;
 		}
diff --git a/cmd/sata.c b/cmd/sata.c
index a1faf2d..8b1f19c 100644
--- a/cmd/sata.c
+++ b/cmd/sata.c
@@ -52,7 +52,7 @@
 			rc = scan_sata(i);
 			if (!rc && (sata_dev_desc[i].lba > 0) &&
 				(sata_dev_desc[i].blksz > 0))
-				init_part(&sata_dev_desc[i]);
+				part_init(&sata_dev_desc[i]);
 		}
 	}
 	sata_curr_device = 0;
@@ -131,7 +131,7 @@
 					++ok;
 					if (dev)
 						putc ('\n');
-					print_part(&sata_dev_desc[dev]);
+					part_print(&sata_dev_desc[dev]);
 				}
 			}
 			if (!ok) {
@@ -164,7 +164,7 @@
 			int dev = (int)simple_strtoul(argv[2], NULL, 10);
 
 			if (sata_dev_desc[dev].part_type != PART_TYPE_UNKNOWN) {
-				print_part(&sata_dev_desc[dev]);
+				part_print(&sata_dev_desc[dev]);
 			} else {
 				printf("\nSATA device %d not available\n", dev);
 				rc = 1;
diff --git a/cmd/scsi.c b/cmd/scsi.c
index dff811b..de0651c 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -156,7 +156,7 @@
 			scsi_dev_desc[scsi_max_devs].log2blksz =
 				LOG2(scsi_dev_desc[scsi_max_devs].blksz);
 			scsi_dev_desc[scsi_max_devs].type=perq;
-			init_part(&scsi_dev_desc[scsi_max_devs]);
+			part_init(&scsi_dev_desc[scsi_max_devs]);
 removable:
 			if(mode==1) {
 				printf ("  Device %d: ", scsi_max_devs);
@@ -301,7 +301,7 @@
 						if (dev)
 							printf("\n");
 						debug ("print_part of %x\n",dev);
-							print_part(&scsi_dev_desc[dev]);
+						part_print(&scsi_dev_desc[dev]);
 					}
 				}
 				if (!ok)
@@ -329,7 +329,7 @@
 			if (strncmp(argv[1],"part",4) == 0) {
 				int dev = (int)simple_strtoul(argv[2], NULL, 10);
 				if(scsi_dev_desc[dev].type != DEV_TYPE_UNKNOWN) {
-					print_part(&scsi_dev_desc[dev]);
+					part_print(&scsi_dev_desc[dev]);
 				}
 				else {
 					printf ("\nSCSI device %d not available\n", dev);
diff --git a/cmd/usb.c b/cmd/usb.c
index 5f3b06a..53fd6ad 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -727,7 +727,7 @@
 					if (devno)
 						printf("\n");
 					debug("print_part of %x\n", devno);
-					print_part(stor_dev);
+					part_print(stor_dev);
 				}
 			}
 		} else {
@@ -737,7 +737,7 @@
 			    stor_dev->type != DEV_TYPE_UNKNOWN) {
 				ok++;
 				debug("print_part of %x\n", devno);
-				print_part(stor_dev);
+				part_print(stor_dev);
 			}
 		}
 		if (!ok) {
