[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:30 AM, Jan Beulich <jbeulich@xxxxxxxx> wrote: > On 14.09.2020 16:25, Trammell Hudson wrote: > > By defining IN as const, the EFI handler functions become almost > > const-correct and allow most of the rest of the EFI boot code to > > use constant strings. > > How does this work with combined "IN OUT"? I'm afraid there is a > reason why things aren't done the way you suggest. WTF FFS UEFI. They really do continue to find new ways to disappoint me. So I see three options: Option 1 is to retroactively modify the C spec to allow us to have a "nonconst" that will override any prior "const" modifiers (last one wins, like Duck Season/Rabbit Season). Option 2 would be to modify the imported header to change the 30 uses of "IN OUT" to "INOUT" and define that to be an empty string. 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). -- Trammell
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |