]> granicus.if.org Git - esp-idf/commitdiff
Add nvs part gen utility multi page blob support update
authorShivani Tipnis <shivani@espressif.com>
Thu, 9 Aug 2018 10:19:07 +0000 (15:49 +0530)
committerShivani Tipnis <shivani@espressif.com>
Thu, 16 Aug 2018 06:16:25 +0000 (11:46 +0530)
components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py

index 6a51e54d9b775a2496a598055edfa40d17e48fb0..429b044ef2e500cd5826d2fb48b5c83ca8471d57 100755 (executable)
@@ -127,8 +127,8 @@ class Page(object):
             chunk_size = 0
 
             # Get the size available in current page
-            if self.entry_num < (Page.PAGE_PARAMS["max_entries"] - 1):
-                tailroom = (Page.PAGE_PARAMS["max_entries"] - self.entry_num - 1) * Page.SINGLE_ENTRY_SIZE
+            tailroom = (Page.PAGE_PARAMS["max_entries"] - self.entry_num - 1) * Page.SINGLE_ENTRY_SIZE
+            assert tailroom >=0, "Page overflow!!"
 
             # Split the binary data into two and store a chunk of available size onto curr page
             if tailroom < remaining_size: