version.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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/module.h>
  10. #include <linux/uts.h>
  11. #include <linux/utsname.h>
  12. #include <generated/utsrelease.h>
  13. #include <linux/version.h>
  14. #include <linux/proc_ns.h>
  15. #ifndef CONFIG_KALLSYMS
  16. #define version(a) Version_ ## a
  17. #define version_string(a) version(a)
  18. extern int version_string(LINUX_VERSION_CODE);
  19. int version_string(LINUX_VERSION_CODE);
  20. #endif
  21. struct uts_namespace init_uts_ns = {
  22. .kref = KREF_INIT(2),
  23. .name = {
  24. .sysname = UTS_SYSNAME,
  25. .nodename = UTS_NODENAME,
  26. .release = UTS_RELEASE,
  27. .version = UTS_VERSION,
  28. .machine = UTS_MACHINE,
  29. .domainname = UTS_DOMAINNAME,
  30. },
  31. .user_ns = &init_user_ns,
  32. .ns.inum = PROC_UTS_INIT_INO,
  33. #ifdef CONFIG_UTS_NS
  34. .ns.ops = &utsns_operations,
  35. #endif
  36. };
  37. EXPORT_SYMBOL_GPL(init_uts_ns);
  38. /* FIXED STRINGS! Don't touch! */
  39. const char linux_banner[] =
  40. "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
  41. LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
  42. const char linux_proc_banner[] =
  43. "%s version %s"
  44. " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
  45. " (" LINUX_COMPILER ") %s\n";