AU: Changes for deltas on traditional bios machines.
BUG=None
TEST=Attached unittests/tested on image
- Fix uninitialized variable err in action processor unittest
- Let Omaha dictate if an update is a delta or full update
- Bug fix in delta generator for differently-sized images
- More logging when applying delta updates
- Fix infinite loop in http fetcher unittest
- log each HTTP connection to know when a dropped connection is
reestablished.
- Detect when speed goes below a threshold and reestablish HTTP
connection (currently < 10bytes/sec for 90 contiguous seconds).
- Fix stack overflow in libcurl http fetcher.
- optimize out a lot of needless CPU usage in libcurl http fetcher
(turns out adding a glib main loop source uses a lot of CPU).
- subprocess: pass PATH, log stdout/stderr
- postinstall runner: support for ext3 and ext4 target filesystems.
Review URL: http://codereview.chromium.org/2805027
diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc
index 23c5fc8..ec07119 100644
--- a/delta_diff_generator.cc
+++ b/delta_diff_generator.cc
@@ -27,6 +27,7 @@
#include "update_engine/utils.h"
using std::make_pair;
+using std::max;
using std::min;
using std::set;
using std::string;
@@ -756,7 +757,7 @@
TEST_AND_RETURN_FALSE(utils::FileSize(old_kernel_part) >= 0);
TEST_AND_RETURN_FALSE(utils::FileSize(new_kernel_part) >= 0);
- vector<Block> blocks(min(old_image_stbuf.st_size / kBlockSize,
+ vector<Block> blocks(max(old_image_stbuf.st_size / kBlockSize,
new_image_stbuf.st_size / kBlockSize));
LOG(INFO) << "invalid: " << Vertex::kInvalidIndex;
LOG(INFO) << "len: " << blocks.size();