Always write SOURCE_COPY blocks in reverse order
Test: treehugger
Bug: 174112589
Change-Id: If95893569ab41d1806f266aa269722b403a50fa4
diff --git a/payload_generator/extent_utils.cc b/payload_generator/extent_utils.cc
index c0c7643..2efef12 100644
--- a/payload_generator/extent_utils.cc
+++ b/payload_generator/extent_utils.cc
@@ -155,4 +155,10 @@
return a.start_block() == b.start_block() && a.num_blocks() == b.num_blocks();
}
+std::ostream& operator<<(std::ostream& out, const Extent& extent) {
+ out << "[" << extent.start_block() << " - "
+ << extent.start_block() + extent.num_blocks() - 1 << "]";
+ return out;
+}
+
} // namespace chromeos_update_engine