diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-02-14 16:54:00 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-20 01:08:09 +0000 |
commit | 3651aea50eed4c24e8cdedcee54f3822c2f0b229 (patch) | |
tree | 82da03aaf02e6dffbd21a4b06f311a52335e016c /common | |
parent | e3bb29fb60440443c0cc8c81010436db7c90bd38 (diff) | |
download | chrome-ec-3651aea50eed4c24e8cdedcee54f3822c2f0b229.tar.gz |
util: Consistently truncate version string
If the initial version string (board_major_branch_numcommits_hash) was
longer than 31 characters, it was being truncated to 31 characters.
However, this truncated version was not being used in the long version
string (that includes the private repos), which was leading to different
versions being shown with the "ectool version" command.
Example:
RO version: bloonchipper_v2.0.3266-78dbc6df
RW version: bloonchipper_v2.0.3266-78dbc6df
Build info: bloonchipper_v2.0.3266-78dbc6dfc
This commit ensures that we use the truncated version everywhere for
consistency.
BRANCH=none
BUG=b:149597326
TEST=make buildall -j
TEST=bloonchipper> version
Change-Id: Iefd6f261fb9f16353c0e9177f0af88d7525b48ef
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2062988
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/version.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c index 13a200b1b5..412faff94f 100644 --- a/common/version.c +++ b/common/version.c @@ -26,6 +26,7 @@ const struct image_data __keep current_image_data .rollback_version = CONFIG_ROLLBACK_VERSION, .cookie2 = CROS_EC_IMAGE_DATA_COOKIE2, }; +BUILD_ASSERT(sizeof(CROS_EC_VERSION32) <= 32); const char build_info[] __keep __attribute__((section(".rodata.buildinfo"))) = VERSION " " DATE " " BUILDER; |