The log message for the failure of calling
hal_device_board_get_upgrade_type() function should be about upgrade
type but "boot mode" is used. It should be fixed.
Comparing two string with strncmp, a string variable "upgrade_type" and
constant string "online", compare length should be provided as "sizeof(
upgrade_type)" but "sizeof(boot_mode)" is used.
Their buffer size(boot_mode and upgrade_type) are same so it was not
making any errors so far but it should be fixed.
Change-Id: I580d04d982b943325643aae885bf5c91dae8c0c5
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
ret = hal_device_board_get_upgrade_type(upgrade_type, sizeof(upgrade_type));
if (ret < 0) {
- _FLOGE("Failed to get boot mode: %d", ret);
+ _FLOGE("Failed to get upgrade type: %d", ret);
return -1;
}
return 0;
}
- if (strncmp(upgrade_type, "online", sizeof(boot_mode)) != 0) {
+ if (strncmp(upgrade_type, "online", sizeof(upgrade_type)) != 0) {
*upgrade_completed = false;
return 0;
}