OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man2 / uname.2
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" 2007-07-05 mtk: Added details on underlying system call interfaces
24 .\"
25 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
26 .\"         all rights reserved.
27 .\" Translated Thu Jun 26 21:23:19 JST 1997
28 .\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
29 .\" Updated & Modified Thu Feb 14 21:53:41 JST 2002
30 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
31 .\" Updated 2007-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
32 .\"
33 .TH UNAME 2 2008-12-03 "Linux" "Linux Programmer's Manual"
34 .SH Ì¾Á°
35 uname \- ¸½ºß²ÔƯÃæ¤Î¥«¡¼¥Í¥ë¤Ë¤Ä¤¤¤Æ¤Î̾Á°¤È¾ðÊó¤òÆÀ¤ë
36 .SH ½ñ¼°
37 .B #include <sys/utsname.h>
38 .sp
39 .BI "int uname(struct utsname *" buf );
40 .SH ÀâÌÀ
41 .BR uname ()
42 ¤Ï
43 .I buf
44 ¤Ç»Ø¤µ¤ì¤ë¹½Â¤ÂΤ˥·¥¹¥Æ¥à¾ðÊó¤òÊÖ¤¹¡£
45 .I utsname
46 ¹½Â¤ÂΤÏ
47 .I <sys/utsname.h>
48 ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
49 .in +4n
50 .nf
51
52 struct utsname {
53     char sysname[];    /* OS ¤Î̾Á° (Îã: "Linux") */
54     char nodename[];   /* ¡Ö¼ÂÁõ»þ¤ËÄêµÁ¤µ¤ì¤¿¡¢²¿¤é¤«¤Î
55                           ¥Í¥Ã¥È¥ï¡¼¥¯¡×¤Ë¤ª¤±¤ë¥Þ¥·¥ó̾ */
56     char release[];    /* OS ¤Î¥ê¥ê¡¼¥¹ (Îã: "2.6.28") */
57     char version[];    /* OS ¤Î¥Ð¡¼¥¸¥ç¥ó */
58     char machine[];    /* ¥Ï¡¼¥É¥¦¥§¥¢¼±Ê̻Ҡ*/
59 #ifdef _GNU_SOURCE
60     char domainname[]; /* NIS ¤ä YP ¤Î¥É¥á¥¤¥ó̾ */
61 #endif
62 };
63
64 .fi
65 .in
66 .I struct utsname
67 ¤Ë¤¢¤ëÇÛÎó¤ÎŤµ¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤ (¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È)¡£
68 ¥Õ¥£¡¼¥ë¥É¤Ï NULL ¥Ð¥¤¥È (\(aq\\0\(aq) ¤Ç½ªÃ¼¤µ¤ì¤ë¡£
69 .SH ÊÖ¤êÃÍ
70 À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤¬Ê֤ꡢ
71 .I errno
72 ¤¬¥¨¥é¡¼¤ÎÆâÍƤ˽¾¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£
73 .SH ¥¨¥é¡¼
74 .TP
75 .B EFAULT
76 .I buf
77 ¤¬Í­¸ú¤Ç¤Ê¤¤¡£
78 .SH ½àµò
79 SVr4, POSIX.1-2001.
80 4.3BSD ¤Ë¤Ï
81 .BR uname ()
82 ¥³¡¼¥ë¤¬¤Ê¤¤¡£
83 .PP
84 .I domainname
85 ¥á¥ó¥Ð¡¼ (NIS ¤Þ¤¿¤Ï YP ¥É¥á¥¤¥ó̾) ¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
86 .SH Ãí°Õ
87 ¤³¤ì¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ê¡¢OS ¤Ï̾Á°¡¦¥ê¥ê¡¼¥¹¡¦¥Ð¡¼¥¸¥ç¥ó¤Ê¤É¤ò
88 ¤¿¤Ö¤óʬ¤«¤Ã¤Æ¤¤¤ë¤À¤í¤¦¡£
89 ¤µ¤é¤Ë¤½¤ì¤¬²ÔƯ¤·¤Æ¤¤¤ë¥Ï¡¼¥É¥¦¥§¥¢¤âʬ¤«¤Ã¤Æ¤¤¤ë¤À¤í¤¦¡£
90 ¤è¤Ã¤Æ¹½Â¤ÂΤΠ4 ¤Ä¤Î¥Õ¥£¡¼¥ë¥É¤Ë¤Ï°ÕÌ£¤¬¤¢¤ë¡£
91 °ìÊý¡¢\fInodename\fP ¥Õ¥£¡¼¥ë¥É¤Ë¤Ï°ÕÌ£¤¬¤Ê¤¤:
92 ¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï¸½ºß¤Î¥Þ¥·¥ó¤Î (ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤)
93 ¤É¤³¤«¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤ª¤±¤ë̾Á°¤òÍ¿¤¨¤ë¤¬¡¢
94 Ä̾ï¥Þ¥·¥ó¤ÏÊ£¿ô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë°¤·¡¢Ê£¿ô¤Î̾Á°¤ò»ý¤Ä¡£
95 ¤µ¤é¤Ë¡¢¥«¡¼¥Í¥ë¤Ï¤³¤Î¤è¤¦¤Ê¾ðÊó¤òÃΤë½Ñ¤ò»ý¤¿¤Ê¤¤¤Î¤Ç¡¢
96 ¤³¤³¤Ç¤ÎÅú¤¨¤ÏÁ°¤â¤Ã¤Æ¶µ¤¨¤Æ¤ä¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
97 ¤³¤ì¤ÏÄɲåե£¡¼¥ë¥É¤Ç¤¢¤ë \fIdomainname\fP ¤Ë¤Ä¤¤¤Æ¤âƱÍͤǤ¢¤ë¡£
98 .LP
99 ¤³¤Î¤¿¤á Linux ¤Ç¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë
100 .BR sethostname (2)
101 ¤È
102 .BR setdomainname (2)
103 ¤¬»È¤ï¤ì¤ë¡£
104 .RB ¡Ö sethostname (2)
105 ¤ÇÀßÄꤵ¤ì¤ë¥Û¥¹¥È̾¤Ï¡¢
106 .BR uname ()
107 ¤ÇÊÖ¤µ¤ì¤ë¹½Â¤ÂΤΠ\fInodename\fP ¥Õ¥£¡¼¥ë¥É¤ÈƱ¤¸Ê¸»úÎó¤Ç¤¢¤ë¡×
108 ¤Èµ¬Äꤷ¤Æ¤¤¤ëɸ½àµ¬³Ê¤Ï¤Ê¤¤
109 (¼ÂºÝ¡¢256 ¥Ð¥¤¥È¤Î¥Û¥¹¥È̾¤È 8 ¥Ð¥¤¥È¤Î¥Î¡¼¥É̾¤òµö²Ä¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤â¤¢¤ë)¡£
110 ¤·¤«¤·¡¢Linux ¤Ç¤ÏƱ¤¸Ê¸»úÎó¤¬ÊÖ¤µ¤ì¤ë¡£
111 .BR setdomainname (2)
112 ¤È \fIdomainname\fP ¥Õ¥£¡¼¥ë¥É¤Ë¤Ä¤¤¤Æ¤âƱ¤¸¤³¤È¤¬À®¤êΩ¤Ä¡£
113 .LP
114 ¹½Â¤ÂΤΥե£¡¼¥ë¥É¤ÎŤµ¤Ï¤µ¤Þ¤¶¤Þ¤Ç¤¢¤ë¡£
115 OS ¤ä¥é¥¤¥Ö¥é¥ê¤ÎÃæ¤Ë¤Ï¡¢
116 ¥Ï¡¼¥É¥³¡¼¥É¤µ¤ì¤¿ 9, 33, 65, 257 ¤Ê¤É¤ÎÃͤò»È¤Ã¤Æ¤¤¤ë¤â¤Î¤â¤¢¤ë¡£
117 ¤Þ¤¿
118 .BR SYS_NMLN ,
119 .BR _SYS_NMLN ,
120 .BR UTSLEN ,
121 .B _UTSNAME_LENGTH
122 ¤Ê¤É¤ò»È¤Ã¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤â¤¢¤ë¡£
123 ¤Ï¤Ã¤­¤ê¸À¤Ã¤Æ¡¢¤³¤ì¤é¤ÎÄê¿ô¤ò»È¤¦¤Î¤Ï°­¤¤¹Í¤¨Êý¤Ç¤¢¤ê¡¢
124 sizeof(...) ¤ò»È¤¦¤Ù¤­¤Ç¤¢¤ë¡£
125 ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥Û¥¹¥È̾¤Ç»È¤¦Îΰè¤ò»ý¤¿¤»¤ë¤¿¤á¤Ë¡¢
126 257 ¤¬Áª¤Ð¤ì¤ë¤³¤È¤¬Â¿¤¤¡£
127 .LP
128 utsname ¤Î¾ðÊó¤Ï¡¢
129 .IR /proc/sys/kernel/ { ostype ,
130 .IR hostname ,
131 .IR osrelease ,
132 .IR version ,
133 .IR domainname }
134 ¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤â¤Ç¤­¤ë¡£
135 .SS Çظå¤Î¥«¡¼¥Í¥ë¡¦¥¤¥ó¥¿¥Õ¥§¡¼¥¹
136 .LP
137 »þ´Ö¤Î·Ð²á¤È¤È¤â¤Ë¡¢
138 .I utsname
139 ¹½Â¤ÂΤΥµ¥¤¥º¤¬Â礭¤¯¤Ê¤ê¡¢¤³¤Î±Æ¶Á¤Ç
140 .BR uname ()
141 ¤Ë¤Ï 3¤Ä¤Î¥Ð¡¼¥¸¥ç¥ó¤¬Â¸ºß¤¹¤ë:
142 .IR sys_olduname ()
143 (¥¹¥í¥Ã¥È¤Ï
144 .IR __NR_oldolduname )¡¢
145 .IR sys_uname ()
146 (¥¹¥í¥Ã¥È¤Ï
147 .IR __NR_olduname )¡¢
148 .IR sys_newuname ()
149 (¥¹¥í¥Ã¥È¤Ï
150 .IR __NR_uname )¡£
151 .IR sys_olduname ()
152 .\" ¤³¤ì¤Ï Linux 1.0 ¤è¤êÁ°¤ËÁ̤ëÏäǤ¢¤ë¡£
153 ¤Ï¤¹¤Ù¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤¬Ä¹¤µ 9 ¤ò»È¤Ã¤Æ¤¤¤¿¡£
154 .IR sys_uname ()
155 .\" ¤³¤ì¤â Linux 1.0 ¤è¤êÁ°¤ËÁ̤ëÏäǤ¢¤ë¡£
156 ¤ÏŤµ 65 ¤ò»È¤Ã¤Æ¤¤¤¿¡£
157 .IR sys_newuname ()
158 ¤âŤµ 65 ¤ò»È¤Ã¤Æ¤¤¤ë¤¬¡¢
159 \fIdomainname\fP ¥Õ¥£¡¼¥ë¥É¤¬Äɲ䵤ì¤Æ¤¤¤ë¡£
160 glibc ¤Î
161 .BR uname ()
162 ¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¤³¤ì¤é¤Î¾ÜºÙ¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤é±£Êä·¡¢
163 ¥«¡¼¥Í¥ë¤¬Ä󶡤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¤¦¤ÁºÇ¿·¤Î¥Ð¡¼¥¸¥ç¥ó¤òµ¯Æ°¤¹¤ë¡£
164 .SH ´ØÏ¢¹àÌÜ
165 .BR uname (1),
166 .BR getdomainname (2),
167 .BR gethostname (2)