summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2019-03-19 13:20:05 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-20 19:51:16 -0700
commitca3f517b0b27e2be1e3d21cecd9958e2e5263512 (patch)
tree8c738a0792936fec4318bf49b0a7e89eb0fec239 /board
parent1d95cefbce43059d2ff74f8ad3ad01ff7c06b50f (diff)
downloadchrome-ec-ca3f517b0b27e2be1e3d21cecd9958e2e5263512.tar.gz
g: add board_id_is_blank
Add board_id_is_blank for checking that all fields of a board id are 0xffffffff. BUG=none BRANCH=cr50 TEST=none Change-Id: I591a3529a7f5a2aa4fcd4a7e0ec43356d0e97237 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1531321 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/cr50/factory_mode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/board/cr50/factory_mode.c b/board/cr50/factory_mode.c
index 6e07fe00f5..a645fd5aed 100644
--- a/board/cr50/factory_mode.c
+++ b/board/cr50/factory_mode.c
@@ -25,8 +25,7 @@ static int board_id_is_erased(void)
return 0;
}
- /* If all of the fields are all 0xffffffff, the board id is not set */
- if (~(id.type & id.type_inv & id.flags) == 0) {
+ if (board_id_is_blank(&id)) {
CPRINTS("BID erased");
return 1;
}