Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99bcbeb3 authored by Ying Wang's avatar Ying Wang
Browse files

Print more info of the image size stats.

Bug: 5620615
Before this change it only reports the limit if the real size exceeeds
or approaches the limit.

Change-Id: Ie1737d6ba2dc2d57ad82c487990e109882526d6e
parent 6f219744
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1865,7 +1865,6 @@ $(if $(2), \
  size=$$(for i in $(1); do $(call get-file-size,$$i); echo +; done; echo 0); \
  total=$$(( $$( echo "$$size" ) )); \
  printname=$$(echo -n "$(1)" | tr " " +); \
  echo "$$printname total size is $$total"; \
  img_blocksize=$(call image-size-from-data-size,$(BOARD_FLASH_BLOCK_SIZE)); \
  if [ "$(3)" == "yaffs" ]; then \
    reservedblocks=8; \
@@ -1877,6 +1876,7 @@ $(if $(2), \
  reserve=$$(((twoblocks > onepct ? twoblocks : onepct) + \
               reservedblocks * img_blocksize)); \
  maxsize=$$(($(2) - reserve)); \
  echo "$$printname maxsize=$$maxsize blocksize=$$img_blocksize total=$$total reserve=$$reserve"; \
  if [ "$$total" -gt "$$maxsize" ]; then \
    echo "error: $$printname too large ($$total > [$(2) - $$reserve])"; \
    false; \