Skip to content

Commit

Permalink
efivar-lite: fix case of hex strings when enumerating efi variables (#51
Browse files Browse the repository at this point in the history
)

* efivar-lite: fix case of hex strings when enumerating efi variables

* ci: install some missing libraries on Ubuntu
  • Loading branch information
Neverous authored Feb 25, 2023
1 parent 158bce9 commit f2eafe5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ jobs:
run: sudo apt-get install libefiboot1 libefiboot-dev libefivar-dev
shell: bash

- name: Install libxkbcommon-x11-0
run: sudo apt-get install libxkbcommon-x11-0
shell: bash

- name: Create build directory
run: mkdir -p build/debug

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:
run: sudo apt-get install libefiboot1 libefiboot-dev libefivar-dev
shell: bash

- name: Install libxkbcommon-x11-0
run: sudo apt-get install libxkbcommon-x11-0
shell: bash

- name: Create build directory
run: mkdir -p build/release

Expand Down
2 changes: 1 addition & 1 deletion src/efivar-lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int _efi_get_next_variable_name(efi_guid_t **guid, TCHAR **name)
size_t enum_index = index / 65536u;
size_t enum_value = index - enum_index * 65536u;
*guid = (efi_guid_t *)&efi_guid_global;
_sntprintf_s(variable_name_buffer, 32, 31, _T("%s%04zx"), enumerated_variable_names[enum_index], enum_value);
_sntprintf_s(variable_name_buffer, 32, 31, _T("%s%04zX"), enumerated_variable_names[enum_index], enum_value);
*name = (TCHAR *)&variable_name_buffer;
++current_variable;
return 1;
Expand Down

0 comments on commit f2eafe5

Please sign in to comment.