Attention is currently required from: Douglas Anderson, Angel Pons, Patrick Rudolph.
Douglas Anderson uploaded patch set #2 to this change.
linux_mtd: Switch fopen() to open() for MTD devices
There's no benefit to using the higher level "FILE *" for file
operations for writing to mtd devices. Let's move to the lower level
ones which matches the kernel more closely.
For background here, using the higher level "FILE *" operations:
* Gives us access to a bunch of higher level functions for file reading
like fscanf(), fgets(), fgetc(), fflush(), ... Many of those are
just wrappers for the lower level operations. Those that aren't
(like fscanf) are things that we don't need for dealing with flash.
* By default provides higher performance by buffering things behind
our back. This is actually something we specifically _don't_ want
because if we send a command like "erase" the C library doesn't know
to throw away its buffers. NOTE: we actually already turned off
buffering in commit a2f2f3f5ee1b ("linux_mtd: Disable buffering on
the mtd device").
So in summary: this change is a no-op but simply removes a layer of
overhead / translation that we just don't need.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Change-Id: Ifeb00b049ba5aa0bc8fdc591ac1f9861ad5d428d
---
M linux_mtd.c
1 file changed, 16 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/06/50206/2
To view, visit change 50206. To unsubscribe, or for help writing mail filters, visit settings.