diff options
author | Himanshu Sahdev <himanshusah@hcl.com> | 2019-09-23 15:08:18 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-02 11:20:06 +0000 |
commit | d3d38c95b7c23c5bd455d35e1b5bef0bce7b2cc5 (patch) | |
tree | 4ba5f318ed1950927b9b93bc4c9e80fd6abed55b /payloads/coreinfo | |
parent | 0f47ff1be5a16c8de1995617830ec8fedbbb4197 (diff) | |
download | coreboot-d3d38c95b7c23c5bd455d35e1b5bef0bce7b2cc5.tar.xz |
coreinfo/coreinfo.c: Support both lower and upper case alphabets
Modify handle_category_key to handle both upper and lower case alphabets
in the coreinfo payload.
Change-Id: I3ccbf69e90ba7824ad6ec85d2ca59aa8f40b3006
Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35538
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/coreinfo')
-rw-r--r-- | payloads/coreinfo/coreinfo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c index b731abfbf5..53985b293a 100644 --- a/payloads/coreinfo/coreinfo.c +++ b/payloads/coreinfo/coreinfo.c @@ -198,8 +198,13 @@ static void redraw_module(struct coreinfo_cat *cat) static void handle_category_key(struct coreinfo_cat *cat, int key) { - if (key >= 'a' && key <= 'z') { - int index = key - 'a'; + if ((key >= 'a' && key <= 'z') || (key >= 'A' && key <= 'Z')) { + int index; + if (key >= 'A' && key <= 'Z') { + index = key - 'A'; + } else { + index = key - 'a'; + } if (index < cat->count) { cat->cur = index; redraw_module(cat); |