Skip to content

Commit

Permalink
storage: reset storage_bmap_dict after writing
Browse files Browse the repository at this point in the history
Signed-off-by: Ding Meng <[email protected]>
  • Loading branch information
DingMeng-Siemens committed Nov 22, 2023
1 parent 2125eaf commit e4b0f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions mtda/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ def storage_write_image(self, path, callback=None):
finally:
# Storage may be closed now
self.storage_close()
self._impl.storage_bmap_dict(None, self._session)

def parseBmap(self, bmap, bmap_path):
try:
Expand Down
3 changes: 2 additions & 1 deletion mtda/storage/helpers/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def setBmap(self, bmapDict):
self.crtBlockRange = 0
self.writtenBytes = 0
self.overlap = 0
self.rangeChkSum = self._get_hasher_by_name()
if bmapDict is not None:
self.rangeChkSum = self._get_hasher_by_name()

def supports_hotplug(self):
return False
Expand Down

0 comments on commit e4b0f93

Please sign in to comment.