| commit | 70838cc1a1294f1f53d00c08d3ee7616db073e8e | [log] [tgz] |
|---|---|---|
| author | Nicolas Boichat <[email protected]> | Thu Apr 08 03:46:26 2021 |
| committer | Jack Rosenthal <[email protected]> | Thu Apr 08 16:46:31 2021 |
| tree | 540f64491237d9a9fde2d43e51a175d906897bc9 | |
| parent | 55ec0755959a1f130684e637dff29ea340dc41f8 [diff] |
cgpt: Use subprocess_run to call flashrom with 1>/dev/null Closing fd=1 is a bad idea, as flashrom will then reuse fd=1 for the MTD device and directly write to it. Luckily, we have a subprocess_run function in vboot that does what we need. There will be some cleanup required after this, but hopefully this is enough to clear the P0 on hand. BUG=b:184559695 TEST=`cgpt find -t kernel` (fails?!), but at least does not corrupt flash: `flashrom -r /usr/local/x.bin && hexdump -C /usr/local/x.bin | head` BRANCH=none Change-Id: Ia82ed7966ea66274f72fe21eca5241633ffbdb5c Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2812630 Reviewed-by: Mike Frysinger <[email protected]> Reviewed-by: Jack Rosenthal <[email protected]> Commit-Queue: Jack Rosenthal <[email protected]>