version.c 1.2 KB

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