ref: ed767e2162ec88ba6983541de6747c175799b864
parent: 7bcabb0be2c844dfb172c1237757f444a8820216
author: gkostka <kostka.grzegorz@gmail.com>
date: Wed Dec 9 08:15:33 EST 2015
ext4_mbr: bootstrap code printf in ext4_mbr_scan function
--- a/lwext4/ext4_mbr.c
+++ b/lwext4/ext4_mbr.c
@@ -63,7 +63,7 @@
int ext4_mbr_scan(struct ext4_blockdev *parent, struct ext4_mbr_bdevs *bdevs)
{
int r;
- int i;
+ size_t i;
ext4_dbg(DEBUG_MBR, DBG_INFO "ext4_mbr_scan\n");
memset(bdevs, 0, sizeof(struct ext4_mbr_bdevs));
@@ -85,10 +85,18 @@
goto blockdev_fini;
}
+ /*Show bootstrap code*/
+ ext4_dbg(DEBUG_MBR, "mbr_part: bootstrap:");
+ for (i = 0; i < sizeof(mbr->bootstrap); ++i) {
+ if (!(i & 0xF))
+ ext4_dbg(DEBUG_MBR | DEBUG_NOPREFIX, "\n");
+ ext4_dbg(DEBUG_MBR | DEBUG_NOPREFIX, "%02x, ", mbr->bootstrap[i]);
+ }
+ ext4_dbg(DEBUG_MBR | DEBUG_NOPREFIX, "\n\n");
for (i = 0; i < 4; ++i) {
const struct ext4_part_entry *pe = &mbr->part_entry[i];
- ext4_dbg(DEBUG_MBR, "mbr_part: %d\n", i);
+ ext4_dbg(DEBUG_MBR, "mbr_part: %d\n", (int)i);
ext4_dbg(DEBUG_MBR, "\tstatus: 0x%x\n", pe->status);
ext4_dbg(DEBUG_MBR, "\ttype 0x%x:\n", pe->type);
ext4_dbg(DEBUG_MBR, "\tfirst_lba: 0x%"PRIx32"\n", pe->first_lba);