Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 254b8d0a authored by Tianjie Xu's avatar Tianjie Xu Committed by android-build-merger
Browse files

Check the results from applypatch am: 31f8cc84 am: d0dcbddd

am: 24488eb7

Change-Id: I27ebbde5a6a013152b2595ff4bcd372b55afefee
parents 04cc390a 24488eb7
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1264,11 +1264,17 @@ static int PerformCommandDiff(CommandParameters& params) {
            }

            if (params.cmdname[0] == 'i') {      // imgdiff
                ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
                    &RangeSinkWrite, &rss, nullptr, nullptr);
                if (ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
                        &RangeSinkWrite, &rss, nullptr, nullptr) != 0) {
                    fprintf(stderr, "Failed to apply image patch.\n");
                    return -1;
                }
            } else {
                ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value, 0,
                    &RangeSinkWrite, &rss, nullptr);
                if (ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
                        0, &RangeSinkWrite, &rss, nullptr) != 0) {
                    fprintf(stderr, "Failed to apply bsdiff patch.\n");
                    return -1;
                }
            }

            // We expect the output of the patcher to fill the tgt ranges exactly.