From: Russ D. <ru...@us...> - 2003-11-27 08:05:43
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv10152 Modified Files: partition.c Log Message: make offset flash work Index: partition.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/partition.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- partition.c 7 Aug 2003 19:31:01 -0000 1.10 +++ partition.c 27 Nov 2003 08:05:39 -0000 1.11 @@ -216,7 +216,7 @@ case BLOB_PART_VALID_MAGIC: printf(" 0x%08x @ 0x%08x (%d kB): '%s'\n", - t->size, t->offset, t->size, t->name); + t->size, t->offset, t->size >> 10, t->name); if(t->flags & BLOB_PART_FLAG_PTABLE) printf(" contains parameter blocks\n"); @@ -259,7 +259,7 @@ /* walk through ptable and fix up BLOB_PART_OFS_APPEND and BLOB_PART_SIZ_FULL entries */ - u32 offset = ptable->offset; + u32 offset = 0; u32 size = ptable->size; int no_more_parts_allowed = 0; blob_partition_t *t = ptable; @@ -436,6 +436,8 @@ const blob_partition_t *pt_find_by_address(u32 addr) { blob_partition_t *t = ptable; + + addr -= ptable->offset; for(;;) { t = next_ptable_entry(t); |