aboutsummaryrefslogtreecommitdiffstats
path: root/drkaiser.c
diff options
context:
space:
mode:
authorEvan Benn <evanbenn@chromium.org>2022-11-09 17:26:57 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-11-24 03:32:07 +0000
commit036897ddc5a6395691f98e630f159dac77701106 (patch)
tree9b89e51f170a8e39f2792bc5bbf8bdbcc701bda2 /drkaiser.c
parente456b496d2308e7474c21918e35ec9f2d12b9713 (diff)
downloadflashrom-036897ddc5a6395691f98e630f159dac77701106.tar.gz
flashrom-036897ddc5a6395691f98e630f159dac77701106.tar.bz2
flashrom-036897ddc5a6395691f98e630f159dac77701106.zip
flashrom_tester: Simplify WriteProtectState
Remove the WriteProtectState 'stack' implementation and the push function. This functionality allowed states to be stacked and then automatically unrolled via RAII lifetimes. This was useful. However this unrolling could make errors in a flashrom_tester run much harder to understand, as the actual failure would be followed by multiple write protect calls that could subsequently fail, potentially causing panicing inside the panic handler and the process to be hard aborted and the restore golden image function would not be run. The new approach is to prefer code simplicity. Ideally this makes errors easier to diagnose from logs. To that end the lifetime has been simplified. The stack has been removed. The mutex has been removed. This means tests may not be running in the same environment they were previously. However if they continue to specify their requirements with set_sw and set_hw there will be no difference and the errors will be clear. BUG=b:259494812 BRANCH=None TEST=flashrom_tester --libflashrom host Change-Id: I1c4251f69b42a327383b8a99fa933f411feb9568 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69401 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'drkaiser.c')
0 files changed, 0 insertions, 0 deletions