OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / draft / man2 / mknodat.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated 2006-09-30 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
28 .\"
29 .TH MKNODAT 2 2010-09-20 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O mknodat \- create a special or ordinary file relative to a directory
33 .\"O file descriptor
34 mknodat \- ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤ˡ¢
35 Æüì¥Õ¥¡¥¤¥ë¤äÄ̾ï¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë
36 .\"O .SH SYNOPSIS
37 .SH ½ñ¼°
38 .nf
39 .\"O .B #include <fcntl.h>           /* Definition of AT_* constants */
40 .B #include <fcntl.h>           /* AT_* Äê¿ô¤ÎÄêµÁ */
41 .B #include <sys/stat.h>
42 .sp
43 .BI "int mknodat(int " dirfd ", const char *" pathname ", mode_t " mode \
44 ", dev_t " dev );
45 .fi
46 .sp
47 .in -4n
48 .\"O Feature Test Macro Requirements for glibc (see
49 .\"O .BR feature_test_macros (7)):
50 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
51 .RB ( feature_test_macros (7)
52 »²¾È):
53 .in
54 .sp
55 .BR mknodat ():
56 .PD 0
57 .ad l
58 .RS 4
59 .TP 4
60 .\"O Since glibc 2.10:
61 glibc 2.10 °Ê¹ß:
62 _XOPEN_SOURCE\ >=\ 700
63 .\" Other FTM combinations will also expose mknodat(), but this function was
64 .\" added in SUSv4, marked XSI, so we'll just document what the standard says
65 .TP 4
66 .\"O Before glibc 2.10:
67 glibc 2.10 ¤è¤êÁ°:
68 _ATFILE_SOURCE
69 .RE
70 .ad
71 .PD
72 .\"O .SH DESCRIPTION
73 .SH ÀâÌÀ
74 .\"O The
75 .\"O .BR mknodat ()
76 .\"O system call operates in exactly the same way as
77 .\"O .BR mknod (2),
78 .\"O except for the differences described in this manual page.
79 .BR mknodat ()
80 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë°ã¤¤¤¬¤¢¤ë°Ê³°¤Ï¡¢
81 .BR mknod (2)
82 ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
83
84 .\"O If the pathname given in
85 .\"O .I pathname
86 .\"O is relative, then it is interpreted relative to the directory
87 .\"O referred to by the file descriptor
88 .\"O .I dirfd
89 .\"O (rather than relative to the current working directory of
90 .\"O the calling process, as is done by
91 .\"O .BR mknod (2)
92 .\"O for a relative pathname).
93 .I pathname
94 ¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹Ì¾¤Ç¤¢¤ë¾ì¹ç¡¢
95 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
96 .I dirfd
97 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
98 .RB ( mknod (2)
99 ¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
100 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹¤È¤Ê¤ë)¡£
101
102 .\"O If
103 .\"O .I pathname
104 .\"O is relative and
105 .\"O .I dirfd
106 .\"O is the special value
107 .\"O .BR AT_FDCWD ,
108 .\"O then
109 .\"O .I pathname
110 .\"O is interpreted relative to the current working
111 .\"O directory of the calling process (like
112 .\"O .BR mknod (2)).
113 .I pathname
114 ¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
115 .I dirfd
116 ¤¬ÆÃÊ̤ÊÃÍ
117 .B AT_FDCWD
118 ¤Ç¤¢¤ë¾ì¹ç¡¢
119 .I pathname
120 ¤Ï
121 .RB ( mknod (2)
122 ¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
123 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
124
125 .\"O If
126 .\"O .I pathname
127 .\"O is absolute, then
128 .\"O .I dirfd
129 .\"O is ignored.
130 .I pathname
131 ¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
132 .I dirfd
133 ¤Ï̵»ë¤µ¤ì¤ë¡£
134 .\"O .SH "RETURN VALUE"
135 .SH ÊÖ¤êÃÍ
136 .\"O On success,
137 .\"O .BR mknodat ()
138 .\"O returns 0.
139 À®¸ù¤·¤¿¾ì¹ç¡¢
140 .BR mknodat ()
141 ¤Ï 0 ¤òÊÖ¤¹¡£
142 .\"O On error, \-1 is returned and
143 .\"O .I errno
144 .\"O is set to indicate the error.
145 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
146 .I errno
147 ¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
148 .\"O .SH ERRORS
149 .SH ¥¨¥é¡¼
150 .\"O The same errors that occur for
151 .\"O .BR mknod (2)
152 .\"O can also occur for
153 .\"O .BR mknodat ().
154 .BR mknod (2)
155 ¤ÈƱ¤¸¥¨¥é¡¼¤¬
156 .BR mknodat ()
157 ¤Ç¤âµ¯¤³¤ë¡£
158 .\"O The following additional errors can occur for
159 .\"O .BR mknodat ():
160 .BR mknodat ()
161 ¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
162 .TP
163 .B EBADF
164 .\"O .I dirfd
165 .\"O is not a valid file descriptor.
166 .I dirfd
167 ¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
168 .TP
169 .B ENOTDIR
170 .\"O .I pathname
171 .\"O is relative and
172 .\"O .I dirfd
173 .\"O is a file descriptor referring to a file other than a directory.
174 .I pathname
175 ¤¬ÁêÂХѥ¹¤Ç¡¢¤«¤Ä
176 .I dirfd
177 ¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
178 .\"O .SH VERSIONS
179 .SH ¥Ð¡¼¥¸¥ç¥ó
180 .\"O .BR mknodat ()
181 .\"O was added to Linux in kernel 2.6.16.
182 .BR mknodat ()
183 ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
184 .\"O .SH "CONFORMING TO"
185 .SH ½àµò
186 POSIX.1-2008.
187 .\"O .SH NOTES
188 .SH Ãí°Õ
189 .\"O See
190 .\"O .BR openat (2)
191 .\"O for an explanation of the need for
192 .\"O .BR mknodat ().
193 .BR mknodat ()
194 ¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
195 .BR openat (2)
196 ¤ò»²¾È¤¹¤ë¤³¤È¡£
197 .\"O .SH "SEE ALSO"
198 .SH ´ØÏ¢¹àÌÜ
199 .BR mknod (2),
200 .BR openat (2),
201 .BR path_resolution (7)