changeset 3207:323cb5ba4487

* src/mmc_spi.c (mmc_spi_check_for_disk): Modify DEBUG1 to to show CHS in partition table.
author jlarmour
date Sat, 02 Mar 2013 20:01:44 +0000
parents 1f3f5c905da8
children 614e724c4b7a
files packages/devs/disk/generic/mmc/current/ChangeLog packages/devs/disk/generic/mmc/current/src/mmc_spi.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/disk/generic/mmc/current/ChangeLog
+++ b/packages/devs/disk/generic/mmc/current/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-21  Mike Jones  <mike@proclivis.com>
+
+	* src/mmc_spi.c (mmc_spi_check_for_disk): Modify DEBUG1 to to show
+	CHS in partition table.
+
 2012-05-04  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* src/mmc_spi.c (mmc_spi_send_init): Silence unused var warning.
--- a/packages/devs/disk/generic/mmc/current/src/mmc_spi.c
+++ b/packages/devs/disk/generic/mmc/current/src/mmc_spi.c
@@ -830,8 +830,10 @@ mmc_spi_check_for_disk(cyg_mmc_spi_disk_
         // 0x1be, 0x1ce, 0x1de and 0x1ee. The numbers are stored little-endian
         for (i = 0; i < 4; i++) {
             partition = &(data[0x1be + (0x10 * i)]);
-            DEBUG1("Partition %d: boot %02x, first sector %02x %02x %02x, file system %02x, last sector %02x %02x %02x\n", i,   \
-                   partition[0], partition[1], partition[2], partition[3], partition[4], \
+            DEBUG1("Partition %d: boot %02x, first CHS %02x, last CHS %02x, first sector %02x %02x %02x, file system %02x, last sector %02x %02x %02x\n", i,   \
+		   partition[0], \
+		   ((partition[2] & 0xC0) << 2) | partition[3], ((partition[6] & 0xC0) << 2) | partition[7], \
+                   partition[1], partition[2], partition[3], partition[4], \
                    partition[5], partition[6], partition[7]);
             DEBUG1("           : first sector (linear) %02x %02x %02x %02x, sector count %02x %02x %02x %02x\n", \
                    partition[11], partition[10], partition[9], partition[8], \