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)
Sat, May 4, 5:11 PM
Unknown Object (File)
Thu, May 2, 9:48 PM
Unknown Object (File)
Thu, May 2, 9:48 PM
Unknown Object (File)
Thu, May 2, 8:50 PM
Unknown Object (File)
Thu, May 2, 8:50 PM
Unknown Object (File)
Thu, May 2, 7:07 PM
Unknown Object (File)
Sun, Apr 28, 2:17 PM
Unknown Object (File)
Thu, Apr 25, 7:19 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 23780
Build 22727: arc lint + arc unit

Event Timeline

sys/modules/em/Makefile
25

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.