aboutsummaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/layout.c b/layout.c
index c01e09c1..b24e4dd9 100644
--- a/layout.c
+++ b/layout.c
@@ -205,7 +205,7 @@ int find_romentry(char *name)
return -1;
}
-int handle_romentries(uint8_t *buffer, struct flashchip *flash)
+int handle_romentries(struct flashchip *flash, uint8_t *oldcontents, uint8_t *newcontents)
{
int i;
@@ -225,13 +225,12 @@ int handle_romentries(uint8_t *buffer, struct flashchip *flash)
// normal will be updated and the rest will be kept.
for (i = 0; i < romimages; i++) {
-
if (rom_entries[i].included)
continue;
- flash->read(flash, buffer + rom_entries[i].start,
- rom_entries[i].start,
- rom_entries[i].end - rom_entries[i].start + 1);
+ memcpy(newcontents + rom_entries[i].start,
+ oldcontents + rom_entries[i].start,
+ rom_entries[i].end - rom_entries[i].start + 1);
}
return 0;