kernel/sys.c: Add build-time check for UNAME26
PATCH 1/1 kernel/sys.c: Add build-time check for UNAME26
Add a build-time check for the major version number, to make sure Linus will update the UNAME26 implementation (and the comment at the top of the function) at the next version increase.
--- kernel/sys.c | 1 + 1 file changed, 1 insertion(+)
kernel/sys.c +1 -0
@@ -1128,6 +1128,7 @@ static int override_release(char __user *release, size_t len)break ; rest++; } +BUILD_BUG_ON ((LINUX_VERSION_CODE >>16 ) !=4 ); v = ((LINUX_VERSION_CODE >>8 ) &0xff ) +60 ; copy =clamp_t (size_t, len,1 ,sizeof (buf)); copy =scnprintf (buf, copy,"2.6.%u%s" , v, rest);
Signature · 1 line
1.9.1
Quoted 3 lines · Geert Uytterhoeven
Add a build-time check for the major version number, to make sure Linus will update the UNAME26 implementation (and the comment at the top of the function) at the next version increase.
I really can't imagine that anybody ever cares about the exact "2.6.x" value, as long as x > 40. So even the original "update 40 to 60" was borderline. I don't think I will ever accept an update to this any more.
If anything, I'd just say "fix it at 2.6.60" or something, and get rid of the insane version code "emulation" crap. Nobody cares.
Linus