• Stefan Tauner's avatar
    Do not read the flash chip twice in verification mode · 78ffbeaa
    Stefan Tauner authored
    
    Kyösti Mälkki noticed that we unnecessarily read the flash chip twice when
    called with --verify. The first one is the mandatory read before everything
    (to be able to detect the seriousness of errors), but the second one is not
    necessary because we can just use the former for the comparison.
    
    This introduces a small output change: previously we printed ERASE or
    VERIFY depending on the callee. This special case has been dropped
    because it is unnecessary to print it (and wrong for the verification
    function to need to know why it is verifying exactly).
    If an erase fails we mention that fact explicitly already, similar for verify.
    
    Corresponding to flashrom svn r1619.
    Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
    Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
    78ffbeaa
flash.h 11.2 KB