Page MenuHomeFreeBSD

kernel: Make some compiling time constant const
Needs ReviewPublic

Authored by zlei on May 17 2024, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 14, 8:01 PM
Unknown Object (File)
Fri, Jun 14, 12:25 PM
Unknown Object (File)
Thu, Jun 13, 6:30 PM
Unknown Object (File)
Wed, Jun 5, 10:02 AM
Unknown Object (File)
Tue, May 21, 4:44 AM
Unknown Object (File)
Sun, May 19, 8:40 PM
Unknown Object (File)
Sun, May 19, 2:11 AM
Unknown Object (File)
Sun, May 19, 2:11 AM

Details

Summary

While reviewing D44760 I realized that the kernel version and some other
variables are generated by sys/conf/newvers.sh at compiling time. Given they
are not subjected to change, make them constant.

No functional change intended.

MFC after: ???

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zlei requested review of this revision.May 17 2024, 10:00 AM
sys/conf/newvers.sh
321

Strictly these are KBI changes. But if we have never promised that those compile time constants can be altered by 3rd party modules, then this change is safe to MFC.

@khng I think with this change even shadowing those global variables can be easily caught.