From b8e985c6a29dff748a44ffc9a142c8244ae18099 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 31 Aug 2016 13:42:11 -0500 Subject: Fix updater binary for 7.0 Note: updater is currently not backwards compatible with older trees. Maybe later... Change-Id: I3c2a5ef69cfa9005502408f7054e3096a64ba34b --- applypatch/applypatch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'applypatch/applypatch.cpp') diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index cc2858551..c2fe11b3b 100644 --- a/applypatch/applypatch.cpp +++ b/applypatch/applypatch.cpp @@ -119,7 +119,7 @@ static int LoadPartitionContents(const char* filename, FileContents* file) { type = MTD; } else if (pieces[0] == "EMMC") { type = EMMC; - } else if (strcmp(magic, "BML") == 0) { + } else if (pieces[0] == "BML") { type = EMMC; } else { printf("LoadPartitionContents called with bad filename (%s)\n", filename); @@ -127,7 +127,7 @@ static int LoadPartitionContents(const char* filename, FileContents* file) { } const char* partition = pieces[1].c_str(); - if (strcmp(magic, "BML") == 0) { + if (pieces[0] == "BML") { if (strcmp(partition, "boot") == 0) { partition = BOARD_BML_BOOT; } else if (strcmp(partition, "recovery") == 0) { @@ -331,7 +331,7 @@ int WriteToPartition(const unsigned char* data, size_t len, const char* target) type = MTD; } else if (pieces[0] == "EMMC") { type = EMMC; - } else if (strcmp(magic, "BML") == 0) { + } else if (pieces[0] == "BML") { type = EMMC; } else { printf("WriteToPartition called with bad target (%s)\n", target); @@ -340,7 +340,7 @@ int WriteToPartition(const unsigned char* data, size_t len, const char* target) const char* partition = pieces[1].c_str(); - if (strcmp(magic, "BML") == 0) { + if (pieces[0] == "BML") { if (strcmp(partition, "boot") == 0) { partition = BOARD_BML_BOOT; } else if (strcmp(partition, "recovery") == 0) { -- cgit v1.2.3