meta-phosphor: logging: use minimum ERR_INFO_CAP if FLASH_SIZE is undefined
In case FLASH_SIZE is undefined, default to the minimum value of
ERR_INFO_CAP instead of failing the build.
Tested:
With FLASH_SIZE undefined, confirmed that the build succeeds and
ERR_INFO_CAP is set to the minimum value of "10".
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Change-Id: I03942ffcb3d238f5231c312e418b4f35079da6b6
diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
index f0c007d..2391c18 100644
--- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
+++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb
@@ -39,7 +39,7 @@
inherit phosphor-dbus-yaml
def get_info_cap(d):
- flash_size = int(d.getVar('FLASH_SIZE'))
+ flash_size = int(d.getVar('FLASH_SIZE') or 0)
if flash_size <= 32768:
return "10"
elif flash_size <= 65536: