Nico Huber uploaded patch set #5 to this change.

View Change

Fix erasing of unaligned regions

The erase (-E) feature is somehow a brute force method, but still, if we
are given a region to erase, we should make sure to restore surrounding
data if the erase block expands beyond the region.

It shares a lot of code with the write path. Though, experiments with
common functions have shown that it would make the whole function even
harder to read. Maybe we could add some abstraction if we ever need
similar code on a third path.

Change-Id: I5fc35310f0b090f218cd1d660e27fb39dd05c3c5
Signed-off-by: Nico Huber <>
M flashrom.c
1 file changed, 66 insertions(+), 3 deletions(-)

git pull ssh:// refs/changes/68/31068/5

To view, visit change 31068. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5fc35310f0b090f218cd1d660e27fb39dd05c3c5
Gerrit-Change-Number: 31068
Gerrit-PatchSet: 5
Gerrit-Owner: Nico Huber <>
Gerrit-Reviewer: Angel Pons <>
Gerrit-Reviewer: Arthur Heymans <>
Gerrit-Reviewer: David Hendricks <>
Gerrit-Reviewer: Nico Huber <>
Gerrit-Reviewer: Patrick Georgi <>
Gerrit-Reviewer: Paul Menzel <>
Gerrit-Reviewer: build bot (Jenkins) <>
Gerrit-MessageType: newpatchset