flashrom.c: Move write_buf_to_file() to helpers_fileio.c

Constructing a written file from a buffer is auxiliary
functionality to the core flashrom algorithms. Move
aside to decrease the overall complexity of flashrom.c

Change-Id: Ib613e74597d4bdd689043ba93aeb6a87ec80cc14
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/66646
Original-Reviewed-by: Evan Benn <evanbenn@google.com>
Original-Reviewed-by: Sam McNally <sammc@google.com>
Original-Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72348
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2 files changed