[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH] efi: const correct EFI functions
On Monday, September 14, 2020 10:55 AM, Jan Beulich <jbeulich@xxxxxxxx> wrote: > On 14.09.2020 16:46, Trammell Hudson wrote: > > Option 3 would be to write wrappers for the few functions that are > > used in the EFI boot path that cast-away the constness of their > > arguments (while also silently cursing the UEFI forum for not > > writing const-correct code). > > This would be kind of a last resort fallback (except for the > cursing, which of course we can do at any time). Since you didn't like the time travel option, I checked to see which functions would need to be wrapped. It is a surprisingly small number: #define PrintStr(s) StdOut->OutputString(StdOut, (CHAR16 *)(s)) #define PrintErr(s) StdErr->OutputString(StdErr, (CHAR16 *)(s)) #define efi_file_open(file,handle,name,mode,attr) \ (file)->Open(file, handle, (CHAR16 *)(name), mode, attr) #define shim_verify(shim, ptr, len) \ (shim)->Verify((void *)(ptr), len) -- Trammell
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |