read partition length from recovery.fstab
Don't hardcode magical partition behavior in the script generator.
Change-Id: I4aeea022f8a32a7c9f316be2c2514510344ca0e0
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 4ed1a07..893cb45 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -172,11 +172,9 @@
fstab = self.info.get("fstab", None)
if fstab:
p = fstab[partition]
- # Reserve the last 16 Kbytes of an EMMC /data for the crypto footer
- if partition == "/data" and common.PARTITION_TYPES[p.fs_type] == "EMMC":
- reserve_size = -16384
self.script.append('format("%s", "%s", "%s", "%s");' %
- (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, reserve_size))
+ (p.fs_type, common.PARTITION_TYPES[p.fs_type],
+ p.device, p.length))
else:
# older target-files without per-partition types
partition = self.info.get("partition_path", "") + partition