mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
kbuild: simplify access to the kernel's version
Instead of storing the version in a single integer and having various kernel (and userspace) code how it's constructed, export individual (major, patchlevel, sublevel) components and simplify kernel code that uses it. This should also make it easier on userspace. Signed-off-by: Sasha Levin <sashal@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
committed by
Masahiro Yamada
parent
9b82f13e7e
commit
88a686728b
@@ -1243,7 +1243,7 @@ static int override_release(char __user *release, size_t len)
|
||||
break;
|
||||
rest++;
|
||||
}
|
||||
v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
|
||||
v = LINUX_VERSION_PATCHLEVEL + 60;
|
||||
copy = clamp_t(size_t, len, 1, sizeof(buf));
|
||||
copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
|
||||
ret = copy_to_user(release, buf, copy + 1);
|
||||
|
Reference in New Issue
Block a user