]> git.sur5r.net Git - u-boot/blobdiff - disk/part_dos.c
mx6slevk: Avoid hardcoded RAM size
[u-boot] / disk / part_dos.c
index 5f8d949b84c7a680c33ce29e296ea0174cf87727..511917a44491e039a396f606da6806d2f4cbe7ac 100644 (file)
@@ -87,11 +87,11 @@ static int test_block_type(unsigned char *buffer)
 }
 
 
-static int test_part_dos(struct blk_desc *dev_desc)
+static int part_test_dos(struct blk_desc *dev_desc)
 {
        ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 
-       if (dev_desc->block_read(dev_desc, 0, 1, (ulong *)buffer) != 1)
+       if (blk_dread(dev_desc, 0, 1, (ulong *)buffer) != 1)
                return -1;
 
        if (test_block_type(buffer) != DOS_MBR)
@@ -111,8 +111,7 @@ static void print_partition_extended(struct blk_desc *dev_desc,
        dos_partition_t *pt;
        int i;
 
-       if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
-                                (ulong *)buffer) != 1) {
+       if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) {
                printf ("** Can't read partition table on %d:" LBAFU " **\n",
                        dev_desc->devnum, ext_part_sector);
                return;
@@ -177,8 +176,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
        int i;
        int dos_type;
 
-       if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
-                                (ulong *)buffer) != 1) {
+       if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) {
                printf ("** Can't read partition table on %d:" LBAFU " **\n",
                        dev_desc->devnum, ext_part_sector);
                return -1;
@@ -287,7 +285,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
        return -1;
 }
 
-void print_part_dos(struct blk_desc *dev_desc)
+void part_print_dos(struct blk_desc *dev_desc)
 {
        printf("Part\tStart Sector\tNum Sectors\tUUID\t\tType\n");
        print_partition_extended(dev_desc, 0, 0, 1, 0);
@@ -303,8 +301,8 @@ U_BOOT_PART_TYPE(dos) = {
        .name           = "DOS",
        .part_type      = PART_TYPE_DOS,
        .get_info       = part_get_info_ptr(part_get_info_dos),
-       .print          = part_print_ptr(print_part_dos),
-       .test           = test_part_dos,
+       .print          = part_print_ptr(part_print_dos),
+       .test           = part_test_dos,
 };
 
 #endif