summaryrefslogtreecommitdiff
path: root/flash.h
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-10-27 15:36:56 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-10-27 15:36:56 +0000
commit3507bfe10d62df350c643656cc676a342eb4bf8f (patch)
tree0a53b1a2841c62239d491c2341f41d073e6d9cbb /flash.h
parent3cd7a94352422d5f92e4c0794b6b002835e43daf (diff)
downloadflashrom-3507bfe10d62df350c643656cc676a342eb4bf8f.tar.gz
Do not read the flash chip twice in verification mode.
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. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1619 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/flash.h b/flash.h
index 0bb6c2b..526087c 100644
--- a/flash.h
+++ b/flash.h
@@ -231,7 +231,7 @@ int min(int a, int b);
int max(int a, int b);
void tolower_string(char *str);
char *extract_param(char **haystack, const char *needle, const char *delim);
-int verify_range(struct flashctx *flash, uint8_t *cmpbuf, unsigned int start, unsigned int len, const char *message);
+int verify_range(struct flashctx *flash, uint8_t *cmpbuf, unsigned int start, unsigned int len);
int need_erase(uint8_t *have, uint8_t *want, unsigned int len, enum write_granularity gran);
char *strcat_realloc(char *dest, const char *src);
void print_version(void);