BmapCreate.py: fix a brown-paperbag bug
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 9 Nov 2012 16:35:33 +0000 (18:35 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 12 Nov 2012 07:36:47 +0000 (09:36 +0200)
We did not seek the image file, so BmapCreate calculated SHA1 incorrectly.
Fix this.

Change-Id: Ie99cf26ac3af4a319832dc79bc82ba89b7b31280
Reported-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCreate.py

index cc26907..0d6009f 100644 (file)
@@ -282,6 +282,8 @@ class BmapCreate:
 
         start = first * self.bmap_block_size
         end = (last + 1) * self.bmap_block_size
+
+        self._f_image.seek(start)
         hash_obj = hashlib.sha1()
 
         chunk_size = 1024*1024