CHAR16 *options = options_initrd ?: entry->options;
if (options) {
loaded_image->LoadOptions = options;
- loaded_image->LoadOptionsSize = StrSize(options);
+ loaded_image->LoadOptionsSize = strsize16(options);
/* Try to log any options to the TPM, especially to catch manually edited options */
(void) tpm_log_load_options(options);
assert(config);
for (UINTN i = 0; i < config->entry_count; i++)
- sz += StrSize(config->entries[i]->id);
+ sz += strsize16(config->entries[i]->id);
p = buffer = xallocate_pool(sz);
for (UINTN i = 0; i < config->entry_count; i++) {
UINTN l;
- l = StrSize(config->entries[i]->id);
+ l = strsize16(config->entries[i]->id);
CopyMem(p, config->entries[i]->id, l);
p += l;
/* if a cmdline is set convert it to UCS2 */
if (cmdline) {
loaded_image->LoadOptions = xstra_to_str(cmdline);
- loaded_image->LoadOptionsSize = StrSize(loaded_image->LoadOptions);
+ loaded_image->LoadOptionsSize = strsize16(loaded_image->LoadOptions);
}
/* install a new LoadedImage protocol. ret_handle is a new image handle */
assert(tcg);
assert(description);
- desc_len = StrSize(description);
+ desc_len = strsize16(description);
tcg_event = xallocate_zero_pool(offsetof(TCG_PCR_EVENT, Event) + desc_len);
*tcg_event = (TCG_PCR_EVENT) {
.EventSize = desc_len,
assert(tcg);
assert(description);
- desc_len = StrSize(description);
+ desc_len = strsize16(description);
tcg_event = xallocate_zero_pool(offsetof(EFI_TCG2_EVENT, Event) + desc_len);
*tcg_event = (EFI_TCG2_EVENT) {
.Size = offsetof(EFI_TCG2_EVENT, Event) + desc_len,
err = tpm_log_event(pcr,
POINTER_TO_PHYSICAL_ADDRESS(load_options),
- StrSize(load_options), load_options);
+ strsize16(load_options), load_options);
if (EFI_ERROR(err))
return log_error_status_stall(err, L"Unable to add load options (i.e. kernel command) line measurement to PCR %u: %r", pcr, err);
}
assert(vendor);
assert(name);
- return efivar_set_raw(vendor, name, value, value ? StrSize(value) : 0, flags);
+ return efivar_set_raw(vendor, name, value, value ? strsize16(value) : 0, flags);
}
EFI_STATUS efivar_set_uint_string(const EFI_GUID *vendor, const CHAR16 *name, UINTN i, UINT32 flags) {