BmapCopy: bugfix: make destination file to be of the same size
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 23 Nov 2012 11:18:38 +0000 (13:18 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 23 Nov 2012 12:12:15 +0000 (14:12 +0200)
commitf0e427a5b5d2f1074fbfb5f51ac5a3c66b68d3c5
tree98eea57260046dbd9fd6051e5f7b525960b0c0b2
parent57460c176239a3980f97c51af264999ad611f7c8
BmapCopy: bugfix: make destination file to be of the same size

When we copy to a regular file using bmap, and the image has holes at the end,
the resulting copy does not contain these holes and its size is shorter.

Fix this bug by truncating the destination file to the image size at the end.

Change-Id: Ie9586a1972e8b1027f76e1973fe6e10fe939f035
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCopy.py