aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Pasanen <dan.pasanen@gmail.com>2015-07-21 10:41:14 -0500
committerHendrik Hagendorn <git@finnq.de>2016-03-09 05:59:38 -0800
commit81ecb7273ef3cee4dd288458eb5b772b260823e7 (patch)
treeb63d6273d9ae1a08a23717f2c366d0f6786a00c7
parent74cacab632cc33f965552fae035aacee6aaf0994 (diff)
recovery: more descriptive flash failure message
* Display the more commonly known (rom-related) baseband version that is being checked for * Explicitly tell the user why the flash failed Change-Id: I433fda5ee8ddcb8d31fa215acf8ae63f374f7189
-rw-r--r--board-info.txt2
-rw-r--r--recovery/recovery_updater.c15
2 files changed, 11 insertions, 6 deletions
diff --git a/board-info.txt b/board-info.txt
index eb4fead..f8ee431 100644
--- a/board-info.txt
+++ b/board-info.txt
@@ -1 +1 @@
-require version-baseband=MPSS.DI.2.0.1.C1.13.2-00002
+require version-baseband=21C:MPSS.DI.2.0.1.C1.13.2-00002
diff --git a/recovery/recovery_updater.c b/recovery/recovery_updater.c
index fa3ec68..61c3458 100644
--- a/recovery/recovery_updater.c
+++ b/recovery/recovery_updater.c
@@ -152,7 +152,9 @@ err_ret:
/* verify_baseband("BASEBAND_VERSION", "BASEBAND_VERSION", ...) */
Value * VerifyBasebandFn(const char *name, State *state, int argc, Expr *argv[]) {
char current_baseband_version[BASEBAND_VER_BUF_LEN];
+ char *baseband_string;
char *baseband_version;
+ char *baseband_short_version;
int i, ret;
ret = get_baseband_version(current_baseband_version, BASEBAND_VER_BUF_LEN);
@@ -162,19 +164,22 @@ Value * VerifyBasebandFn(const char *name, State *state, int argc, Expr *argv[])
}
for (i = 0; i < argc; i++) {
- baseband_version = Evaluate(state, argv[i]);
- if (baseband_version < 0) {
+ baseband_string = Evaluate(state, argv[i]);
+ if (baseband_string < 0) {
return ErrorAbort(state, "%s() error parsing arguments: %d",
- name, baseband_version);
+ name, baseband_string);
}
- uiPrintf(state, "Comparing BASEBAND version %s to %s",
- baseband_version, current_baseband_version);
+ baseband_short_version = strtok(baseband_string, ":");
+ baseband_version = strtok(NULL, ":");
+
+ uiPrintf(state, "Checking for BASEBAND version %s", baseband_short_version);
if (strncmp(baseband_version, current_baseband_version, strlen(baseband_version)) == 0) {
return StringValue(strdup("1"));
}
}
+ uiPrintf(state, "ERROR: It appears you are running an unsupported baseband.");
return StringValue(strdup("0"));
}