Allow callers to override the default partition size.
Callers should know the actual size of the image on the device. If they do,
use that and not our hard-coded constant.
BUG=chromium:234556
TEST=Running it on canary try jobs
Change-Id: I1f4e268d218d83d5499fd1561f8aacf8c4b0f7c2
Reviewed-on: https://gerrit.chromium.org/gerrit/48963
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/generate_delta_main.cc b/generate_delta_main.cc
index bde08d4..7c8b54b 100644
--- a/generate_delta_main.cc
+++ b/generate_delta_main.cc
@@ -61,6 +61,9 @@
"signature will be assigned a client version, starting from "
"kSignatureOriginalVersion.");
DEFINE_int32(chunk_size, -1, "Payload chunk size (-1 -- no limit/default)");
+DEFINE_int64(rootfs_partition_size,
+ chromeos_update_engine::kRootFSPartitionSize,
+ "RootFS partition size for the image once installed");
// This file contains a simple program that takes an old path, a new path,
// and an output file as arguments and the path to an output file and
@@ -274,6 +277,7 @@
FLAGS_out_file,
FLAGS_private_key,
FLAGS_chunk_size,
+ FLAGS_rootfs_partition_size,
&metadata_size)) {
return 1;
}