cros_generate_update_payload: Truncate rootfs to the filesystem size.

The delta_generator only updates the filesystem data, not the whole
partition. Currently, delta_generator code reads the size of the
filesystem and updates only that part. This patch resizes the rootfs
file before feeding it to the delta_generator in preparation for the
removal of the filesystem size computation in delta_generator.

TEST=`cros_generate_uptade_payload --extract --image $IMAGE` for lumpy-7262.57.0 and lumpy-2913.331.0
TEST=`cros_generate_update_payload --output payload.bin --image $IMAGE` for base and test images.

Change-Id: Iba508c4e12ad661e9a079e2f7d037187f8ec2b41
Commit-Ready: Alex Deymo <>
Tested-by: Alex Deymo <>
Reviewed-by: Mike Frysinger <>
1 file changed