@Panayotis Katsaloulis Both patches work, but the second version of the fix is much simpler and required less editing of the code: https://sourceforge.net/p/refind/code/merge-requests/55/
Can confirm that refit_call3_wrapper(gBS->SetMem, ...) fixes the duplicate tools bug. I've closed my original merge request and opened a simpler one.
Wrap SetMem for GNU-EFI and use for showtools config
Wrap SetMem when built with GNU-EFI to fix the "duplicate tools" bug
Iteratively zero out GlobalConfig.ShowTools after processing showtools tokens
I can confirm that refit_call3_wrapper(gBS->SetMem, ...) fixes the issue. I will close this merge request and open another with a simpler fix.
Wrap SetMem for GNU-EFI and use for show_tools config
Wrap SetMem for GNU-EFI and use for show_tools config
Wrap SetMem for GNU-EFI and use for show_tools config
@Felipe I have submitted a merge request to fix the issue, hopefully the author accepts it.
Iteratively zero out GlobalConfig.ShowTools after processing showtools tokens
Iteratively populate and zero out GlobalConfig.ShowTools
Sorry, last thing. Should note that my "fixed" code at https://github.com/loserMcloser/rEFInd/blob/86c7ab03db42001bfbe5c7e72654e568572e063f/refind/config.c#L669-L718 is not actually an appropriate fix, because of the way that the TokenList index variable and the GlobalConfig.ShowTools index variable are tied together. If the SetMem command is commented out and one of the TokenList items triggers the final "unknown showtools flag" else block, the entry at position GlobalConfig.ShowTools[i-1] is not...
Also, isn't there an off-by-one error in the bound of that for loop in config.c ? Since i-1 is used as the index variable to set items in the GlobalConfig.ShowTools array, shouldn't for (i = 1; (i < TokenCount) && (i < NUM_TOOLS); i++) { instead be for (i = 1; (i < TokenCount) && (i <= NUM_TOOLS); i++) { ?
Yes, this is almost certainly the issue. I edited the showtools code in config.c by commenting out the SetMem call and then adding a loop to "manually" zero out the rest of the GlobalConfig.ShowTools array, and it fixed the issue. See here: https://github.com/loserMcloser/rEFInd/blob/86c7ab03db42001bfbe5c7e72654e568572e063f/refind/config.c#L669-L718 Couple of side notes: * On my two machines where the issue occurs, secure boot is enabled and managed by rEFInd. My machine where the issue doesn't occur...
Only one showtools option in my configs: % grep -r showtools /boot /boot/EFI/refind/refind.conf:showtools mok_tool,reboot,shutdown,firmware,memtest After commenting out hideui the two instances of mok_tool reported identical paths. The other tools did not report any paths. (Sorry for the glare.) Here is my current config: ######################## # General Settings ######################## timeout 10 resolution 1920 1200 showtools mok_tool,reboot,shutdown,firmware,memtest scanfor manual default_selection...
Since upgrading to 0.14.2 on Archlinux, the tools are duplicated. My showtools entry in refind.conf is showtools mok_tool,reboot,shutdown,firmware,memtest but since upgrading, what shows up on the refind screen when booting is mok_tool,reboot,shutdown,memtest,mok_tool,about,shutdown,reboot,memtest I'm not the only archuser to have this issue: rEFInd - showtools option no longer working after updating to 0.14.2-1 Oddly, the issue only occurs on two of my three Archlinux machines (laptop, home desktop,...