On Tue, Sep 09, 2025 at 01:12:54PM +0200, Renaud Métrich via Grub-devel wrote:
> Hi Daniel,
>
> Thank you for the extensive review.
>
> I acknowledge all your points.
>
> The only remaining issue I have is with grub_efidisk_reenumerate_disks()
> for which you state it's not needed to export the symbol.
>
> If I remove the export, then compilation fails, but I don't understand
> exactly why, I believe it's due to having "connectefi" command be a module,
> which tends to confirm exporting the symbol is required.
>
> grub_efidisk_reenumerate_disks() is defined in grub-core/disk/efi/efidisk.c:
>
> 399 void
> 400 grub_efidisk_reenumerate_disks (void)
> 401 {
> 402 free_devices (fd_devices);
> 403 free_devices (hd_devices);
> 404 free_devices (cd_devices);
> 405 fd_devices = NULL;
> 406 hd_devices = NULL;
> 407 cd_devices = NULL;
> 408
> 409 enumerate_disks ();
> 410 }
>
> It's declared in include/grub/efi/disk.h:
>
> 33 void grub_efidisk_reenumerate_disks (void);
>
> With this (hence without EXPORT_FUNC), I get the following compilation
> error:
>
> cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm -f
> moddep.lst; exit 1)
> grub_efidisk_reenumerate_disks in connectefi is not defined
> make[3]: *** [Makefile:53735: moddep.lst] Error 1
I have just realized the grub-core/disk/efi/efidisk.c is build into the kernel.
So, the EXPORT_FUNC() is required. Sorry for confusion...
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel