Commit 5ea1e20c authored by Bjorn Andersson's avatar Bjorn Andersson
Browse files

program: Match xbl in a/b scenarios



On devices implementing a/b updates the xbl partiiton will be named
xbl_a and xbl_b, extend the match for finding the bootable partition to
support this.

Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 826a5cd4
...@@ -139,9 +139,9 @@ int program_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, ...@@ -139,9 +139,9 @@ int program_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl,
* *
* Returns partition number, or negative errno on failure. * Returns partition number, or negative errno on failure.
* *
* Scan program tags for a partition with the label "xbl" or "sbl1" and return * Scan program tags for a partition with the label "sbl1" or that starts with
* the partition number for this. If more than one line matches we're assuming * the string "xbl" and return the partition number for this. If more than one
* our logic is flawed and return an error. * line matches we're assuming our logic is flawed and return an error.
*/ */
int program_find_bootable_partition(void) int program_find_bootable_partition(void)
{ {
...@@ -152,7 +152,7 @@ int program_find_bootable_partition(void) ...@@ -152,7 +152,7 @@ int program_find_bootable_partition(void)
for (program = programes; program; program = program->next) { for (program = programes; program; program = program->next) {
label = program->label; label = program->label;
if (!strcmp(label, "xbl") || !strcmp(label, "sbl1")) { if (!strncmp(label, "xbl", 3) || !strcmp(label, "sbl1")) {
if (part != -ENOENT) if (part != -ENOENT)
return -EINVAL; return -EINVAL;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment