version.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * linux/init/version.c
  4. *
  5. * Copyright (C) 1992 Theodore Ts'o
  6. *
  7. * May be freely distributed as part of Linux.
  8. */
  9. #include <generated/compile.h>
  10. #include <linux/build-salt.h>
  11. #include <linux/export.h>
  12. #include <linux/uts.h>
  13. #include <linux/utsname.h>
  14. #include <generated/utsrelease.h>
  15. #include <linux/version.h>
  16. #include <linux/proc_ns.h>
  17. #ifndef CONFIG_KALLSYMS
  18. #define version(a) Version_ ## a
  19. #define version_string(a) version(a)
  20. extern int version_string(LINUX_VERSION_CODE);
  21. int version_string(LINUX_VERSION_CODE);
  22. #endif
  23. struct uts_namespace init_uts_ns = {
  24. .kref = KREF_INIT(2),
  25. .name = {
  26. .sysname = UTS_SYSNAME,
  27. .nodename = UTS_NODENAME,
  28. .release = UTS_RELEASE,
  29. .version = UTS_VERSION,
  30. .machine = UTS_MACHINE,
  31. .domainname = UTS_DOMAINNAME,
  32. },
  33. .user_ns = &init_user_ns,
  34. .ns.inum = PROC_UTS_INIT_INO,
  35. #ifdef CONFIG_UTS_NS
  36. .ns.ops = &utsns_operations,
  37. #endif
  38. };
  39. EXPORT_SYMBOL_GPL(init_uts_ns);
  40. /* FIXED STRINGS! Don't touch! */
  41. const char linux_banner[] =
  42. "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
  43. LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
  44. const char linux_proc_banner[] =
  45. "%s version %s"
  46. " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
  47. " (" LINUX_COMPILER ") %s\n";
  48. BUILD_SALT;