From: Artem Bityutskiy Date: Fri, 9 Nov 2012 16:35:33 +0000 (+0200) Subject: BmapCreate.py: fix a brown-paperbag bug X-Git-Tag: v1.0~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed34cd339eab82b49cdbed45820fe481b75da5a3;p=tools%2Fbmap-tools.git BmapCreate.py: fix a brown-paperbag bug We did not seek the image file, so BmapCreate calculated SHA1 incorrectly. Fix this. Change-Id: Ie99cf26ac3af4a319832dc79bc82ba89b7b31280 Reported-by: Ross Burton Signed-off-by: Artem Bityutskiy --- diff --git a/bmaptools/BmapCreate.py b/bmaptools/BmapCreate.py index cc26907..0d6009f 100644 --- a/bmaptools/BmapCreate.py +++ b/bmaptools/BmapCreate.py @@ -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