Page MenuHomeFreeBSD

Use symlinks for kernel modules rather than hardlinks
ClosedPublic

Authored by asomers on Apr 20 2019, 2:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 12:13 PM
Unknown Object (File)
Dec 28 2023, 3:18 PM
Unknown Object (File)
Dec 21 2023, 4:03 PM
Unknown Object (File)
Dec 20 2023, 4:52 AM
Unknown Object (File)
Dec 3 2023, 3:07 PM
Unknown Object (File)
Dec 3 2023, 1:38 PM
Unknown Object (File)
Dec 3 2023, 1:38 PM
Unknown Object (File)
Dec 3 2023, 1:38 PM
Subscribers

Details

Summary

Use symlinks for kernel modules rather than hardlinks

When aliasing a kernel module to a different name (ie if_igb for if_em),
it's better to use symlinks than hard links. kldxref will omit entries for
the links, ensuring that the loaded module has the correct name.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/modules/em/Makefile
25 ↗(On Diff #56414)

Why specify directories here. Elsewhere in the tree we just do the moral equivalent of ${KMOD},ko ${KMODDIR}/if_igb.ko

I think the original LINKS were wrong :) My suggestion would allow mv /boot/kernel /boot/kernel.old and have the symlinks still be good. It didn't matter with hard links.

Here and below.

Good catch, imp.
Use relative symlinks instead of absolute.

This revision is now accepted and ready to land.Apr 20 2019, 4:30 AM
This revision was automatically updated to reflect the committed changes.