connectcore-demo-example: fix get storage size in demo server
File '/proc/mtd' may exist in the file system although with no data. So, first check the emmc file '/sys/class/mmc_host/mmc0/mmc0:0001/block/mmcblk0/size'. Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
This commit is contained in:
parent
6ff808bc80
commit
aaf09f4a9c
|
|
@ -1138,10 +1138,10 @@ def get_storage_size():
|
|||
Returns:
|
||||
Integer: The internal storage size, -1 if fails.
|
||||
"""
|
||||
if os.path.exists(NAND_SIZE_FILE):
|
||||
return get_nand_size()
|
||||
if os.path.exists(EMMC_SIZE_FILE):
|
||||
return get_emmc_size()
|
||||
if os.path.exists(NAND_SIZE_FILE):
|
||||
return get_nand_size()
|
||||
return -1
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue