logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

uname.3p (3805B)


  1. '\" et
  2. .TH UNAME "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. uname
  12. \(em get the name of the current system
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <sys/utsname.h>
  17. .P
  18. int uname(struct utsname *\fIname\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIuname\fR()
  23. function shall store information identifying the current system in the
  24. structure pointed to by
  25. .IR name .
  26. .P
  27. The
  28. \fIuname\fR()
  29. function uses the
  30. .BR utsname
  31. structure defined in
  32. .IR <sys/utsname.h> .
  33. .P
  34. The
  35. \fIuname\fR()
  36. function shall return a string naming the current system in the
  37. character array
  38. .IR sysname .
  39. Similarly,
  40. .IR nodename
  41. shall contain the name of this node within an implementation-defined
  42. communications network. The arrays
  43. .IR release
  44. and
  45. .IR version
  46. shall further identify the operating system. The array
  47. .IR machine
  48. shall contain a name that identifies the hardware that the system
  49. is running on.
  50. .P
  51. The format of each member is implementation-defined.
  52. .SH "RETURN VALUE"
  53. Upon successful completion, a non-negative value shall be returned.
  54. Otherwise, \-1 shall be returned and
  55. .IR errno
  56. set to indicate the error.
  57. .SH ERRORS
  58. No errors are defined.
  59. .LP
  60. .IR "The following sections are informative."
  61. .SH EXAMPLES
  62. None.
  63. .SH "APPLICATION USAGE"
  64. The inclusion of the
  65. .IR nodename
  66. member in this structure does not imply that it is sufficient
  67. information for interfacing to communications networks.
  68. .SH RATIONALE
  69. The values of the structure members are not constrained to have any
  70. relation to the version of this volume of POSIX.1\(hy2017 implemented in the operating
  71. system. An application should instead depend on _POSIX_VERSION
  72. and related constants defined in
  73. .IR <unistd.h> .
  74. .P
  75. This volume of POSIX.1\(hy2017 does not define the sizes of the members of the structure
  76. and permits them to be of different sizes, although most
  77. implementations define them all to be the same size: eight bytes plus
  78. one byte for the string terminator. That size for
  79. .IR nodename
  80. is not enough for use with many networks.
  81. .P
  82. The
  83. \fIuname\fR()
  84. function originated in System III, System V, and related
  85. implementations,
  86. and it does not exist in Version 7 or
  87. 4.3 BSD. The values it returns are set at system compile time in those
  88. historical implementations.
  89. .P
  90. 4.3 BSD has
  91. \fIgethostname\fR()
  92. and
  93. \fIgethostid\fR(),
  94. which return a symbolic name and a numeric value, respectively. There
  95. are related
  96. \fIsethostname\fR()
  97. and
  98. \fIsethostid\fR()
  99. functions that are used to set the values the other two functions
  100. return. The former functions are included in this specification, the
  101. latter are not.
  102. .SH "FUTURE DIRECTIONS"
  103. None.
  104. .SH "SEE ALSO"
  105. The Base Definitions volume of POSIX.1\(hy2017,
  106. .IR "\fB<sys_utsname.h>\fP"
  107. .\"
  108. .SH COPYRIGHT
  109. Portions of this text are reprinted and reproduced in electronic form
  110. from IEEE Std 1003.1-2017, Standard for Information Technology
  111. -- Portable Operating System Interface (POSIX), The Open Group Base
  112. Specifications Issue 7, 2018 Edition,
  113. Copyright (C) 2018 by the Institute of
  114. Electrical and Electronics Engineers, Inc and The Open Group.
  115. In the event of any discrepancy between this version and the original IEEE and
  116. The Open Group Standard, the original IEEE and The Open Group Standard
  117. is the referee document. The original Standard can be obtained online at
  118. http://www.opengroup.org/unix/online.html .
  119. .PP
  120. Any typographical or formatting errors that appear
  121. in this page are most likely
  122. to have been introduced during the conversion of the source files to
  123. man page format. To report such errors, see
  124. https://www.kernel.org/doc/man-pages/reporting_bugs.html .