diff options
author | Hung-Te Lin <hungte@chromium.org> | 2020-05-11 12:28:26 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-11 08:22:48 +0000 |
commit | 6f207a88c3778d0de6554bdca9e7c91896bc9d47 (patch) | |
tree | 7e7cce704433d6533927fcc66aa4a7e346c853ae /futility | |
parent | 8dac1697aef0114584d737e6a3027b55abdae5f0 (diff) | |
download | vboot-6f207a88c3778d0de6554bdca9e7c91896bc9d47.tar.gz |
futility: updater: Platform name check should be case insensitive
Some platforms (e.g., Zork) may decide to change platform name from
lower_case to CamelCase after early builds, and platform name check will
be an AU blocker in that case.
Considering there should be no devices having same name (and using
incompatible firmware), it should be fine to change the strncmp to
strncasecmp so the platform name check will be case insensitive.
BUG=b:156119908
TEST=make runtests
BRANCH=None
Change-Id: I5014c136976454dd0965a607e5a98bbe4543a41e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2192537
Commit-Queue: Rob Barnes <robbarnes@google.com>
Tested-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/updater.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/futility/updater.c b/futility/updater.c index 8f2db611..336ec6d7 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -654,7 +654,7 @@ static int check_compatible_platform(struct updater_config *cfg) } len = from_dot - image_from->ro_version + 1; VB2_DEBUG("Platform: %*.*s\n", len, len, image_from->ro_version); - return strncmp(image_from->ro_version, image_to->ro_version, len); + return strncasecmp(image_from->ro_version, image_to->ro_version, len); } /* |