Merge "applypatch: Don't expose FindMatchingPatch()."
This commit is contained in:
@@ -391,7 +391,7 @@ int ParseSha1(const char* str, uint8_t* digest) {
|
|||||||
// Search an array of sha1 strings for one matching the given sha1.
|
// Search an array of sha1 strings for one matching the given sha1.
|
||||||
// Return the index of the match on success, or -1 if no match is
|
// Return the index of the match on success, or -1 if no match is
|
||||||
// found.
|
// found.
|
||||||
int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str) {
|
static int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str) {
|
||||||
for (size_t i = 0; i < patch_sha1_str.size(); ++i) {
|
for (size_t i = 0; i < patch_sha1_str.size(); ++i) {
|
||||||
uint8_t patch_sha1[SHA_DIGEST_LENGTH];
|
uint8_t patch_sha1[SHA_DIGEST_LENGTH];
|
||||||
if (ParseSha1(patch_sha1_str[i].c_str(), patch_sha1) == 0 &&
|
if (ParseSha1(patch_sha1_str[i].c_str(), patch_sha1) == 0 &&
|
||||||
|
|||||||
@@ -63,9 +63,8 @@ int applypatch_flash(const char* source_filename, const char* target_filename,
|
|||||||
|
|
||||||
int LoadFileContents(const char* filename, FileContents* file);
|
int LoadFileContents(const char* filename, FileContents* file);
|
||||||
int SaveFileContents(const char* filename, const FileContents* file);
|
int SaveFileContents(const char* filename, const FileContents* file);
|
||||||
int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str);
|
|
||||||
|
|
||||||
// bsdiff.cpp
|
// bspatch.cpp
|
||||||
void ShowBSDiffLicense();
|
void ShowBSDiffLicense();
|
||||||
int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
|
int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
|
||||||
const Value* patch, ssize_t patch_offset,
|
const Value* patch, ssize_t patch_offset,
|
||||||
|
|||||||
Reference in New Issue
Block a user