diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-01-31 14:37:08 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-28 03:43:09 +0000 |
commit | 78d1ed61d6b7d3e3af631f4c9b17af340e6f7c05 (patch) | |
tree | fa625607d9f0012b06268a4a3bb203c6356bd8f8 /util | |
parent | c9f2a4db18e0c38a2cf1934a2d69043922866d3b (diff) | |
download | chrome-ec-78d1ed61d6b7d3e3af631f4c9b17af340e6f7c05.tar.gz |
common/system: Unify ec_current_image and system_image_copy_t
"enum ec_current_image" is exposed in ec_commands.h (and used by non-EC
code, such as biod).
We also have an "enum system_image_copy_t" that is the exact same thing
(though has a few more definitions).
A followup CL (I714b6bd8c0d7192386404c25a831e38438fa5238) adds the
"sysinfo" host command, so we want to be able to expose all the
potential image variants. Rather than maintain two enums that can
potentially get out of sync, unify the code to use a single enum. We
choose to keep the "enum ec_current_image", since external code depends
on it.
To verify that this change results in no changes to the generated
binaries:
./util/compare_build.sh --board all
BRANCH=none
BUG=b:146447208
TEST=./util/compare_build.sh --board=all
Change-Id: I13776bc3fd6e6ad635980476a35571c52b1767ac
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2036599
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 2 | ||||
-rw-r--r-- | util/genvif.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/util/ectool.c b/util/ectool.c index 50f64e8ab2..bf7f11ce65 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -324,7 +324,7 @@ const char help_str[] = " Enable/disable WLAN/Bluetooth radio\n" ""; -/* Note: depends on enum system_image_copy_t */ +/* Note: depends on enum ec_image */ static const char * const image_names[] = {"unknown", "RO", "RW"}; /* Note: depends on enum ec_led_colors */ diff --git a/util/genvif.c b/util/genvif.c index 796384aee0..66640a8a03 100644 --- a/util/genvif.c +++ b/util/genvif.c @@ -42,9 +42,9 @@ char *yes_no(int val) return val ? "YES" : "NO"; } -enum system_image_copy_t system_get_image_copy(void) +enum ec_image system_get_image_copy(void) { - return SYSTEM_IMAGE_RW; + return EC_IMAGE_RW; } static void write_title(FILE *vif) |