Page MenuHomeFreeBSD

net/if_dl.h: put kernel decls behind _KERNEL
ClosedPublic

Authored by ivy on Apr 29 2025, 4:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 21, 6:04 AM
Unknown Object (File)
Wed, Sep 24, 3:31 AM
Unknown Object (File)
Sep 21 2025, 5:23 AM
Unknown Object (File)
Sep 4 2025, 3:03 AM
Unknown Object (File)
Aug 31 2025, 9:33 AM
Unknown Object (File)
Jul 28 2025, 11:11 PM
Unknown Object (File)
Jul 28 2025, 5:12 PM
Unknown Object (File)
Jul 5 2025, 5:41 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Apr 29 2025, 4:08 AM
des added inline comments.
sys/net/if_dl.h
78
This revision is now accepted and ready to land.May 5 2025, 11:25 PM
sys/net/if_dl.h
78

I believe that should also be !_KERNEL, while we're at it... the positive form would go on the #endif, traditionally

sys/net/if_dl.h
78

That would also mean that line 87 is reversed, looking at the context. There are some other wrong examples in sys/sys/*.h, maybe we should do a pass and normalize to what style(9) wants.

sys/net/if_dl.h
78

I checked what diff -D_KERNEL would do and the #else needs a ! but line 87 is fine, since it closes the !_KERNEL section.

This revision was automatically updated to reflect the committed changes.
sys/net/if_dl.h
78

We should update style(9), then... the #endif comments in both of the COMPAT_43 examples there strictly match the original condition.

sys/net/if_dl.h
78

Yeah style(9) matches what I'm used to seeing. Not sure if diff is broken or if they've always disagreed. The logical side of me wants to follow the tooling, the practical side of me doesn't want to change 30+ years of precedent.