version.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 = {
  23. .refcount = ATOMIC_INIT(2),
  24. },
  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";