Check the results from applypatch
am: 31f8cc84cf
Change-Id: Ie50652158b65d723346ffff18c85cbaab11820e1
This commit is contained in:
commit
d0dcbddd31
1 changed files with 10 additions and 4 deletions
|
@ -1267,11 +1267,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.
|
||||
|
|
Loading…
Reference in a new issue