void display_info(void) { fat_dir_entry_t *de; u32_t rds; fprintf(stderr, "fs_loc: p: s: %-8x e: %x\n", loc.locators[FS_LOC_PANIC].start, loc.locators[FS_LOC_PANIC].end); fprintf(stderr, " c: s: %-8x e: %x\n", loc.locators[FS_LOC_CONFIG].start, loc.locators[FS_LOC_CONFIG].end); fprintf(stderr, " i: s: %-8x e: %x\n", loc.locators[FS_LOC_IMAGE].start, loc.locators[FS_LOC_IMAGE].end); fprintf(stderr, " d: s: %-8x e: %-8x n: %x\n", loc.locators[FS_LOC_DBLK].start, loc.locators[FS_LOC_DBLK].end, msc_dblk_nxt); if (p0c.panic_start) fprintf(stderr, "panic0: p: %-8x %-8x (nxt) %-8x\n", p0c.panic_start, p0c.panic_end, p0c.panic_nxt); else fprintf(stderr, "panic0: no panic0 block\n"); de = f32_get_de("PANIC001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "PANIC001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "PANIC001: not found\n"); de = f32_get_de("CNFG0001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "CNFG0001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "CNFG0001: not found\n"); de = f32_get_de("IMAGE001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "IMAGE001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "IMAGE001: not found\n"); de = f32_get_de("DBLK0001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "DBLK0001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "DBLK0001: not found\n"); }
void display_info(void) { fat_dir_entry_t *de; u32_t rds; if (msc.dblk_start) { fprintf(stderr, "dblk_loc: p: %-8x %-8x\n", msc.panic_start, msc.panic_end); fprintf(stderr, " c: %-8x %-8x\n", msc.config_start, msc.config_end); fprintf(stderr, " d: %-8x %-8x (nxt) %-8x\n", msc.dblk_start, msc.dblk_end, msc.dblk_nxt); } if (p0c.panic_start) fprintf(stderr, "panic0: p: %-8x %-8x (nxt) %-8x\n", p0c.panic_start, p0c.panic_end, p0c.panic_nxt); else fprintf(stderr, "panic0: no panic0 block\n"); de = f32_get_de("PANIC001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "PANIC001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "PANIC001: not found\n"); de = f32_get_de("CNFG0001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "CNFG0001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "CNFG0001: not found\n"); de = f32_get_de("DBLK0001", " ", &rds); if (de) { rds = (CF_LE_16(de->starthi) << 16) | CF_LE_16(de->start); fprintf(stderr, "DBLK0001: start 0x%04x size: %10u (0x%x)\n", fx_clu2sec(rds), CF_LE_32(de->size), CF_LE_32(de->size)); } else fprintf(stderr, "DBLK0001: not found\n"); }