diff options
| author | Peter Jones <pjones@redhat.com> | 2021-02-23 10:23:38 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-02-25 10:15:14 -0500 |
| commit | 6168b48258b8fd0c66be42a09e5612e41c908408 (patch) | |
| tree | a9554cb780dca9fd41f87625ac0b187bf7a15c01 /include | |
| parent | 6eef250a82b0fe65c39b4c05f49035473d4bce0a (diff) | |
| download | efi-boot-shim-6168b48258b8fd0c66be42a09e5612e41c908408.tar.gz efi-boot-shim-6168b48258b8fd0c66be42a09e5612e41c908408.zip | |
SBAT: make our sbat section parser use the csv parser
This makes the .sbat section parser use parse_csv_data(). It also
re-names a couple of the structs, because they were still too easy to
get lost in.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbat.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/sbat.h b/include/sbat.h index ffde202d..7aec3b78 100644 --- a/include/sbat.h +++ b/include/sbat.h @@ -18,7 +18,7 @@ extern list_t sbat_var; EFI_STATUS parse_sbat_var(list_t *entries); void cleanup_sbat_var(list_t *entries); -struct sbat_entry { +struct sbat_section_entry { const CHAR8 *component_name; const CHAR8 *component_generation; const CHAR8 *vendor_name; @@ -26,11 +26,14 @@ struct sbat_entry { const CHAR8 *vendor_version; const CHAR8 *vendor_url; }; +#define SBAT_SECTION_COLUMNS (sizeof (struct sbat_section_entry) / sizeof(CHAR8 *)) -EFI_STATUS parse_sbat(char *sbat_base, size_t sbat_size, size_t *sbats, struct sbat_entry ***sbat); -void cleanup_sbat_entries(size_t n, struct sbat_entry **entries); +EFI_STATUS +parse_sbat_section(char *section_base, size_t section_size, size_t *n, + struct sbat_section_entry ***entriesp); +void cleanup_sbat_section_entries(size_t n, struct sbat_section_entry **entries); -EFI_STATUS verify_sbat(size_t n, struct sbat_entry **entries); +EFI_STATUS verify_sbat(size_t n, struct sbat_section_entry **entries); #endif /* !SBAT_H_ */ // vim:fenc=utf-8:tw=75:noet |
