version.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef CONFIG_KALLSYMS
  15. #define version(a) Version_ ## a
  16. #define version_string(a) version(a)
  17. extern int version_string(LINUX_VERSION_CODE);
  18. int version_string(LINUX_VERSION_CODE);
  19. #endif
  20. struct uts_namespace init_uts_ns = {
  21. .kref = {
  22. .refcount = ATOMIC_INIT(2),
  23. },
  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. };
  34. EXPORT_SYMBOL_GPL(init_uts_ns);
  35. /* FIXED STRINGS! Don't touch! */
  36. const char linux_banner[] =
  37. "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
  38. LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
  39. const char linux_proc_banner[] =
  40. "%s version %s"
  41. " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
  42. " (" LINUX_COMPILER ") %s\n";