[PATCH 3/3] efi_loader: adjust sorting of capsules

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Dec 29 14:44:02 CET 2022


The UEFI specification requires to apply capsules in alphabetical order.
The current implementation only sorted by the first letter due to using
strcmp() which will stop at the first zero byte.

* Provide function u16_strcasecmp() for case insensitive comparision of
  UTF-16 strings
* Provide a unit test for u16_strcasecmp()
* Use the function to sort capsules.

We do not implement the special handling of the rightmost period of
capsule names yet.

Heinrich Schuchardt (3):
  lib: add function u16_strcasecmp()
  test: unit test for u16_strcasecmp()
  efi_loader: adjust sorting of capsules

 include/charset.h            | 13 +++++++++++++
 lib/charset.c                | 27 +++++++++++++++++++++++++++
 lib/efi_loader/efi_capsule.c |  9 ++++++---
 test/unicode_ut.c            | 25 +++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 3 deletions(-)

-- 
2.37.2



More information about the U-Boot mailing list