OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.40.
[linuxjm/LDP_man-pages.git] / po4a / filesystem / po / filesystem.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man5/filesystems.5:25
21 #, no-wrap
22 msgid "FILESYSTEMS"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man5/filesystems.5:25
27 #, no-wrap
28 msgid "2010-05-24"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man5/filesystems.5:25 build/C/man3/fts.3:38 build/C/man3/ftw.3:34 build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/mount.2:40 build/C/man7/path_resolution.7:23 build/C/man2/removexattr.2:27 build/C/man2/setxattr.2:27 build/C/man2/spu_create.2:24 build/C/man2/spu_run.2:25 build/C/man7/spufs.7:26 build/C/man2/stat.2:40 build/C/man2/statfs.2:26 build/C/man3/statvfs.3:28 build/C/man2/sysfs.2:25 build/C/man2/umount.2:30 build/C/man2/ustat.2:28
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man5/filesystems.5:25 build/C/man3/fts.3:38 build/C/man3/ftw.3:34 build/C/man3/getfsent.3:25 build/C/man3/getmntent.3:30 build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/mount.2:40 build/C/man7/path_resolution.7:23 build/C/man2/removexattr.2:27 build/C/man2/setxattr.2:27 build/C/man2/spu_create.2:24 build/C/man2/spu_run.2:25 build/C/man7/spufs.7:26 build/C/man2/stat.2:40 build/C/man2/statfs.2:26 build/C/man3/statvfs.3:28 build/C/man2/sysfs.2:25 build/C/man2/umount.2:30 build/C/man2/ustat.2:28
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man5/filesystems.5:27 build/C/man3/fts.3:39 build/C/man3/ftw.3:35 build/C/man3/getfsent.3:26 build/C/man3/getmntent.3:31 build/C/man2/getxattr.2:28 build/C/man2/listxattr.2:28 build/C/man2/mount.2:41 build/C/man7/path_resolution.7:24 build/C/man2/removexattr.2:28 build/C/man2/setxattr.2:28 build/C/man2/spu_create.2:25 build/C/man2/spu_run.2:26 build/C/man7/spufs.7:27 build/C/man2/stat.2:41 build/C/man2/statfs.2:27 build/C/man3/statvfs.3:29 build/C/man2/sysfs.2:26 build/C/man2/umount.2:31 build/C/man2/ustat.2:29
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man5/filesystems.5:31
51 msgid ""
52 "filesystems - Linux file-system types: minix, ext, ext2, ext3, ext4, "
53 "Reiserfs, XFS, JFS, xia, msdos, umsdos, vfat, ntfs, proc, nfs, iso9660, "
54 "hpfs, sysv, smb, ncpfs"
55 msgstr ""
56
57 #. type: SH
58 #: build/C/man5/filesystems.5:31 build/C/man3/fts.3:59 build/C/man3/ftw.3:54 build/C/man3/getfsent.3:40 build/C/man3/getmntent.3:63 build/C/man2/getxattr.2:44 build/C/man2/listxattr.2:43 build/C/man2/mount.2:51 build/C/man7/path_resolution.7:26 build/C/man2/removexattr.2:41 build/C/man2/setxattr.2:44 build/C/man2/spu_create.2:36 build/C/man2/spu_run.2:35 build/C/man7/spufs.7:29 build/C/man2/stat.2:72 build/C/man2/statfs.2:35 build/C/man3/statvfs.3:37 build/C/man2/sysfs.2:34 build/C/man2/umount.2:41 build/C/man2/ustat.2:41
59 #, no-wrap
60 msgid "DESCRIPTION"
61 msgstr ""
62
63 #. type: Plain text
64 #: build/C/man5/filesystems.5:41
65 msgid ""
66 "When, as is customary, the B<proc> file system is mounted on I</proc>, you "
67 "can find in the file I</proc/filesystems> which file systems your kernel "
68 "currently supports.  If you need a currently unsupported one, insert the "
69 "corresponding module or recompile the kernel."
70 msgstr ""
71
72 #. type: Plain text
73 #: build/C/man5/filesystems.5:46
74 msgid "In order to use a file system, you have to I<mount> it; see B<mount>(8)."
75 msgstr ""
76
77 #. type: Plain text
78 #: build/C/man5/filesystems.5:48
79 msgid "Below a short description of a few of the available file systems."
80 msgstr ""
81
82 #. type: TP
83 #: build/C/man5/filesystems.5:48
84 #, no-wrap
85 msgid "B<minix>"
86 msgstr ""
87
88 #. type: Plain text
89 #: build/C/man5/filesystems.5:55
90 msgid ""
91 "is the file system used in the Minix operating system, the first to run "
92 "under Linux.  It has a number of shortcomings: a 64MB partition size limit, "
93 "short filenames, a single timestamp, etc.  It remains useful for floppies "
94 "and RAM disks."
95 msgstr ""
96
97 #. type: TP
98 #: build/C/man5/filesystems.5:55
99 #, no-wrap
100 msgid "B<ext>"
101 msgstr ""
102
103 #. type: Plain text
104 #: build/C/man5/filesystems.5:64
105 msgid ""
106 "is an elaborate extension of the B<minix> file system.  It has been "
107 "completely superseded by the second version of the extended file system "
108 "(B<ext2>)  and has been removed from the kernel (in 2.1.21)."
109 msgstr ""
110
111 #. type: TP
112 #: build/C/man5/filesystems.5:64
113 #, no-wrap
114 msgid "B<ext2>"
115 msgstr ""
116
117 #. type: Plain text
118 #: build/C/man5/filesystems.5:74
119 msgid ""
120 "is the high performance disk file system used by Linux for fixed disks as "
121 "well as removable media.  The second extended file system was designed as an "
122 "extension of the extended file system (B<ext>).  B<ext2> offers the best "
123 "performance (in terms of speed and CPU usage) of the file systems supported "
124 "under Linux."
125 msgstr ""
126
127 #. type: TP
128 #: build/C/man5/filesystems.5:74
129 #, no-wrap
130 msgid "B<ext3>"
131 msgstr ""
132
133 #. type: Plain text
134 #: build/C/man5/filesystems.5:79
135 msgid ""
136 "is a journaling version of the ext2 file system.  It is easy to switch back "
137 "and forth between ext2 and ext3."
138 msgstr ""
139
140 #. type: TP
141 #: build/C/man5/filesystems.5:79
142 #, no-wrap
143 msgid "B<ext4>"
144 msgstr ""
145
146 #. type: Plain text
147 #: build/C/man5/filesystems.5:84
148 msgid ""
149 "is a set of upgrades to ext3 including substantial performance and "
150 "reliability enhancements, plus large increases in volume, file, and "
151 "directory size limits."
152 msgstr ""
153
154 #. type: TP
155 #: build/C/man5/filesystems.5:84
156 #, no-wrap
157 msgid "B<Reiserfs>"
158 msgstr ""
159
160 #. type: Plain text
161 #: build/C/man5/filesystems.5:88
162 msgid ""
163 "is a journaling file system, designed by Hans Reiser, that was integrated "
164 "into Linux in kernel 2.4.1."
165 msgstr ""
166
167 #. type: TP
168 #: build/C/man5/filesystems.5:88
169 #, no-wrap
170 msgid "B<XFS>"
171 msgstr ""
172
173 #. type: Plain text
174 #: build/C/man5/filesystems.5:92
175 msgid ""
176 "is a journaling file system, developed by SGI, that was integrated into "
177 "Linux in kernel 2.4.20."
178 msgstr ""
179
180 #. type: TP
181 #: build/C/man5/filesystems.5:92
182 #, no-wrap
183 msgid "B<JFS>"
184 msgstr ""
185
186 #. type: Plain text
187 #: build/C/man5/filesystems.5:96
188 msgid ""
189 "is a journaling file system, developed by IBM, that was integrated into "
190 "Linux in kernel 2.4.24."
191 msgstr ""
192
193 #. type: TP
194 #: build/C/man5/filesystems.5:96
195 #, no-wrap
196 msgid "B<xiafs>"
197 msgstr ""
198
199 #. type: Plain text
200 #: build/C/man5/filesystems.5:106
201 msgid ""
202 "was designed and implemented to be a stable, safe file system by extending "
203 "the Minix file system code.  It provides the basic most requested features "
204 "without undue complexity.  The B<xia> file system is no longer actively "
205 "developed or maintained.  It was removed from the kernel in 2.1.21."
206 msgstr ""
207
208 #. type: TP
209 #: build/C/man5/filesystems.5:106
210 #, no-wrap
211 msgid "B<msdos>"
212 msgstr ""
213
214 #. type: Plain text
215 #: build/C/man5/filesystems.5:112
216 msgid ""
217 "is the file system used by DOS, Windows, and some OS/2 computers.  B<msdos> "
218 "filenames can be no longer than 8 characters, followed by an optional period "
219 "and 3 character extension."
220 msgstr ""
221
222 #. type: TP
223 #: build/C/man5/filesystems.5:112
224 #, no-wrap
225 msgid "B<umsdos>"
226 msgstr ""
227
228 #. type: Plain text
229 #: build/C/man5/filesystems.5:119
230 msgid ""
231 "is an extended DOS file system used by Linux.  It adds capability for long "
232 "filenames, UID/GID, POSIX permissions, and special files (devices, named "
233 "pipes, etc.)  under the DOS file system, without sacrificing compatibility "
234 "with DOS."
235 msgstr ""
236
237 #. type: TP
238 #: build/C/man5/filesystems.5:119
239 #, no-wrap
240 msgid "B<vfat>"
241 msgstr ""
242
243 #. type: Plain text
244 #: build/C/man5/filesystems.5:123
245 msgid ""
246 "is an extended DOS file system used by Microsoft Windows95 and Windows NT.  "
247 "VFAT adds the capability to use long filenames under the MSDOS file system."
248 msgstr ""
249
250 #. type: TP
251 #: build/C/man5/filesystems.5:123
252 #, no-wrap
253 msgid "B<ntfs>"
254 msgstr ""
255
256 #. type: Plain text
257 #: build/C/man5/filesystems.5:128
258 msgid ""
259 "replaces Microsoft Window's FAT file systems (VFAT, FAT32).  It has "
260 "reliability, performance, and space-utilization enhancements plus features "
261 "like ACLs, journaling, encryption, and so on."
262 msgstr ""
263
264 #. type: TP
265 #: build/C/man5/filesystems.5:128
266 #, no-wrap
267 msgid "B<proc>"
268 msgstr ""
269
270 #. type: Plain text
271 #: build/C/man5/filesystems.5:136
272 msgid ""
273 "is a pseudo file system which is used as an interface to kernel data "
274 "structures rather than reading and interpreting I</dev/kmem>.  In "
275 "particular, its files do not take disk space.  See B<proc>(5)."
276 msgstr ""
277
278 #. type: TP
279 #: build/C/man5/filesystems.5:136
280 #, no-wrap
281 msgid "B<iso9660>"
282 msgstr ""
283
284 #. type: Plain text
285 #: build/C/man5/filesystems.5:139
286 msgid "is a CD-ROM file system type conforming to the ISO 9660 standard."
287 msgstr ""
288
289 #. type: TP
290 #: build/C/man5/filesystems.5:140
291 #, no-wrap
292 msgid "B<High Sierra>"
293 msgstr ""
294
295 #. type: Plain text
296 #: build/C/man5/filesystems.5:147
297 msgid ""
298 "Linux supports High Sierra, the precursor to the ISO 9660 standard for "
299 "CD-ROM file systems.  It is automatically recognized within the B<iso9660> "
300 "file-system support under Linux."
301 msgstr ""
302
303 #. type: TP
304 #: build/C/man5/filesystems.5:147
305 #, no-wrap
306 msgid "B<Rock Ridge>"
307 msgstr ""
308
309 #. type: Plain text
310 #: build/C/man5/filesystems.5:158
311 msgid ""
312 "Linux also supports the System Use Sharing Protocol records specified by the "
313 "Rock Ridge Interchange Protocol.  They are used to further describe the "
314 "files in the B<iso9660> file system to a UNIX host, and provide information "
315 "such as long filenames, UID/GID, POSIX permissions, and devices.  It is "
316 "automatically recognized within the B<iso9660> file-system support under "
317 "Linux."
318 msgstr ""
319
320 #. type: TP
321 #: build/C/man5/filesystems.5:159
322 #, no-wrap
323 msgid "B<hpfs>"
324 msgstr ""
325
326 #. type: Plain text
327 #: build/C/man5/filesystems.5:164
328 msgid ""
329 "is the High Performance Filesystem, used in OS/2.  This file system is "
330 "read-only under Linux due to the lack of available documentation."
331 msgstr ""
332
333 #. type: TP
334 #: build/C/man5/filesystems.5:164
335 #, no-wrap
336 msgid "B<sysv>"
337 msgstr ""
338
339 #. type: Plain text
340 #: build/C/man5/filesystems.5:168
341 msgid ""
342 "is an implementation of the SystemV/Coherent file system for Linux.  It "
343 "implements all of Xenix FS, SystemV/386 FS, and Coherent FS."
344 msgstr ""
345
346 #. type: TP
347 #: build/C/man5/filesystems.5:168
348 #, no-wrap
349 msgid "B<nfs>"
350 msgstr ""
351
352 #. type: Plain text
353 #: build/C/man5/filesystems.5:171
354 msgid "is the network file system used to access disks located on remote computers."
355 msgstr ""
356
357 #. type: TP
358 #: build/C/man5/filesystems.5:171
359 #, no-wrap
360 msgid "B<smb>"
361 msgstr ""
362
363 #. type: Plain text
364 #: build/C/man5/filesystems.5:175
365 msgid ""
366 "is a network file system that supports the SMB protocol, used by Windows for "
367 "Workgroups, Windows NT, and Lan Manager."
368 msgstr ""
369
370 #. type: Plain text
371 #: build/C/man5/filesystems.5:181
372 msgid ""
373 "To use B<smb> fs, you need a special mount program, which can be found in "
374 "the ksmbfs package, found at "
375 "I<ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs>."
376 msgstr ""
377
378 #. type: TP
379 #: build/C/man5/filesystems.5:181
380 #, no-wrap
381 msgid "B<ncpfs>"
382 msgstr ""
383
384 #. type: Plain text
385 #: build/C/man5/filesystems.5:185
386 msgid ""
387 "is a network file system that supports the NCP protocol, used by Novell "
388 "NetWare."
389 msgstr ""
390
391 #. type: Plain text
392 #: build/C/man5/filesystems.5:190
393 msgid ""
394 "To use B<ncpfs>, you need special programs, which can be found at "
395 "I<ftp://linux01.gwdg.de/pub/ncpfs>."
396 msgstr ""
397
398 #. type: SH
399 #: build/C/man5/filesystems.5:190 build/C/man3/fts.3:781 build/C/man3/ftw.3:404 build/C/man3/getfsent.3:131 build/C/man3/getmntent.3:193 build/C/man2/getxattr.2:143 build/C/man2/listxattr.2:155 build/C/man2/mount.2:454 build/C/man7/path_resolution.7:229 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:153 build/C/man2/spu_create.2:265 build/C/man2/spu_run.2:259 build/C/man7/spufs.7:765 build/C/man2/stat.2:638 build/C/man2/statfs.2:275 build/C/man3/statvfs.3:179 build/C/man2/umount.2:170 build/C/man2/ustat.2:114
400 #, no-wrap
401 msgid "SEE ALSO"
402 msgstr ""
403
404 #. type: Plain text
405 #: build/C/man5/filesystems.5:195
406 msgid "B<proc>(5), B<fsck>(8), B<mkfs>(8), B<mount>(8)"
407 msgstr ""
408
409 #. type: SH
410 #: build/C/man5/filesystems.5:195 build/C/man3/fts.3:787 build/C/man3/ftw.3:408 build/C/man3/getfsent.3:134 build/C/man3/getmntent.3:197 build/C/man2/getxattr.2:153 build/C/man2/listxattr.2:165 build/C/man2/mount.2:459 build/C/man7/path_resolution.7:234 build/C/man2/removexattr.2:120 build/C/man2/setxattr.2:163 build/C/man2/spu_create.2:270 build/C/man2/spu_run.2:264 build/C/man7/spufs.7:771 build/C/man2/stat.2:647 build/C/man2/statfs.2:279 build/C/man3/statvfs.3:181 build/C/man2/sysfs.2:102 build/C/man2/umount.2:175 build/C/man2/ustat.2:117
411 #, no-wrap
412 msgid "COLOPHON"
413 msgstr ""
414
415 #. type: Plain text
416 #: build/C/man5/filesystems.5:202 build/C/man3/fts.3:794 build/C/man3/ftw.3:415 build/C/man3/getfsent.3:141 build/C/man3/getmntent.3:204 build/C/man2/getxattr.2:160 build/C/man2/listxattr.2:172 build/C/man2/mount.2:466 build/C/man7/path_resolution.7:241 build/C/man2/removexattr.2:127 build/C/man2/setxattr.2:170 build/C/man2/spu_create.2:277 build/C/man2/spu_run.2:271 build/C/man7/spufs.7:778 build/C/man2/stat.2:654 build/C/man2/statfs.2:286 build/C/man3/statvfs.3:188 build/C/man2/sysfs.2:109 build/C/man2/umount.2:182 build/C/man2/ustat.2:124
417 msgid ""
418 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
419 "description of the project, and information about reporting bugs, can be "
420 "found at http://www.kernel.org/doc/man-pages/."
421 msgstr ""
422
423 #. type: TH
424 #: build/C/man3/fts.3:38
425 #, no-wrap
426 msgid "FTS"
427 msgstr ""
428
429 #. type: TH
430 #: build/C/man3/fts.3:38
431 #, no-wrap
432 msgid "2007-12-28"
433 msgstr ""
434
435 #. type: Plain text
436 #: build/C/man3/fts.3:42
437 msgid ""
438 "fts, fts_open, fts_read, fts_children, fts_set, fts_close - traverse a file "
439 "hierarchy"
440 msgstr ""
441
442 #. type: SH
443 #: build/C/man3/fts.3:42 build/C/man3/ftw.3:37 build/C/man3/getfsent.3:28 build/C/man3/getmntent.3:34 build/C/man2/getxattr.2:30 build/C/man2/listxattr.2:30 build/C/man2/mount.2:43 build/C/man2/removexattr.2:30 build/C/man2/setxattr.2:30 build/C/man2/spu_create.2:27 build/C/man2/spu_run.2:28 build/C/man2/stat.2:43 build/C/man2/statfs.2:29 build/C/man3/statvfs.3:31 build/C/man2/sysfs.2:28 build/C/man2/umount.2:33 build/C/man2/ustat.2:31
444 #, no-wrap
445 msgid "SYNOPSIS"
446 msgstr ""
447
448 #. type: Plain text
449 #: build/C/man3/fts.3:47
450 #, no-wrap
451 msgid ""
452 "B<#include E<lt>sys/types.hE<gt>>\n"
453 "B<#include E<lt>sys/stat.hE<gt>>\n"
454 "B<#include E<lt>fts.hE<gt>>\n"
455 msgstr ""
456
457 #. type: Plain text
458 #: build/C/man3/fts.3:50
459 #, no-wrap
460 msgid ""
461 "B<FTS *fts_open(char * const *>I<path_argv>B<, int >I<options>B<, >\n"
462 "B<              int (*>I<compar>B<)(const FTSENT **, const FTSENT **));>\n"
463 msgstr ""
464
465 #. type: Plain text
466 #: build/C/man3/fts.3:52
467 #, no-wrap
468 msgid "B<FTSENT *fts_read(FTS *>I<ftsp>B<);>\n"
469 msgstr ""
470
471 #. type: Plain text
472 #: build/C/man3/fts.3:54
473 #, no-wrap
474 msgid "B<FTSENT *fts_children(FTS *>I<ftsp>B<, int >I<options>B<);>\n"
475 msgstr ""
476
477 #. type: Plain text
478 #: build/C/man3/fts.3:56
479 #, no-wrap
480 msgid "B<int fts_set(FTS *>I<ftsp>B<, FTSENT *>I<f>B<, int >I<options>B<);>\n"
481 msgstr ""
482
483 #. type: Plain text
484 #: build/C/man3/fts.3:58
485 #, no-wrap
486 msgid "B<int fts_close(FTS *>I<ftsp>B<);>\n"
487 msgstr ""
488
489 #. type: Plain text
490 #: build/C/man3/fts.3:83
491 msgid ""
492 "The fts functions are provided for traversing file hierarchies.  A simple "
493 "overview is that the B<fts_open>()  function returns a \"handle\" on a file "
494 "hierarchy, which is then supplied to the other fts functions.  The function "
495 "B<fts_read>()  returns a pointer to a structure describing one of the files "
496 "in the file hierarchy.  The function B<fts_children>()  returns a pointer to "
497 "a linked list of structures, each of which describes one of the files "
498 "contained in a directory in the hierarchy.  In general, directories are "
499 "visited two distinguishable times; in preorder (before any of their "
500 "descendants are visited) and in postorder (after all of their descendants "
501 "have been visited).  Files are visited once.  It is possible to walk the "
502 "hierarchy \"logically\" (ignoring symbolic links)  or physically (visiting "
503 "symbolic links), order the walk of the hierarchy or prune and/or revisit "
504 "portions of the hierarchy."
505 msgstr ""
506
507 #. type: Plain text
508 #: build/C/man3/fts.3:104
509 msgid ""
510 "Two structures are defined (and typedef'd) in the include file "
511 "I<E<lt>fts.hE<gt>>.  The first is I<FTS>, the structure that represents the "
512 "file hierarchy itself.  The second is I<FTSENT>, the structure that "
513 "represents a file in the file hierarchy.  Normally, an I<FTSENT> structure "
514 "is returned for every file in the file hierarchy.  In this manual page, "
515 "\"file\" and \"FTSENT structure\" are generally interchangeable.  The "
516 "I<FTSENT> structure contains at least the following fields, which are "
517 "described in greater detail below:"
518 msgstr ""
519
520 #. type: Plain text
521 #: build/C/man3/fts.3:123
522 #, no-wrap
523 msgid ""
524 "typedef struct _ftsent {\n"
525 "    unsigned short fts_info;     /* flags for FTSENT structure */\n"
526 "    char          *fts_accpath;  /* access path */\n"
527 "    char          *fts_path;     /* root path */\n"
528 "    short          fts_pathlen;  /* strlen(fts_path) */\n"
529 "    char          *fts_name;     /* filename */\n"
530 "    short          fts_namelen;  /* strlen(fts_name) */\n"
531 "    short          fts_level;    /* depth (-1 to N) */\n"
532 "    int            fts_errno;    /* file errno */\n"
533 "    long           fts_number;   /* local numeric value */\n"
534 "    void          *fts_pointer;  /* local address value */\n"
535 "    struct ftsent *fts_parent;   /* parent directory */\n"
536 "    struct ftsent *fts_link;     /* next file structure */\n"
537 "    struct ftsent *fts_cycle;    /* cycle structure */\n"
538 "    struct stat   *fts_statp;    /* stat(2) information */\n"
539 "} FTSENT;\n"
540 msgstr ""
541
542 #.  .Bl -tag -width "fts_namelen"
543 #. type: Plain text
544 #: build/C/man3/fts.3:128
545 msgid "These fields are defined as follows:"
546 msgstr ""
547
548 #. type: TP
549 #: build/C/man3/fts.3:128
550 #, no-wrap
551 msgid "I<fts_info>"
552 msgstr ""
553
554 #.  .Bl  -tag -width FTS_DEFAULT
555 #. type: Plain text
556 #: build/C/man3/fts.3:140
557 msgid ""
558 "One of the following flags describing the returned I<FTSENT> structure and "
559 "the file it represents.  With the exception of directories without errors "
560 "(B<FTS_D>), all of these entries are terminal, that is, they will not be "
561 "revisited, nor will any of their descendants be visited."
562 msgstr ""
563
564 #. type: TP
565 #: build/C/man3/fts.3:141
566 #, no-wrap
567 msgid "B<FTS_D>"
568 msgstr ""
569
570 #. type: Plain text
571 #: build/C/man3/fts.3:144
572 msgid "A directory being visited in preorder."
573 msgstr ""
574
575 #. type: TP
576 #: build/C/man3/fts.3:144
577 #, no-wrap
578 msgid "B<FTS_DC>"
579 msgstr ""
580
581 #. type: Plain text
582 #: build/C/man3/fts.3:152
583 msgid ""
584 "A directory that causes a cycle in the tree.  (The I<fts_cycle> field of the "
585 "I<FTSENT> structure will be filled in as well.)"
586 msgstr ""
587
588 #. type: TP
589 #: build/C/man3/fts.3:152
590 #, no-wrap
591 msgid "B<FTS_DEFAULT>"
592 msgstr ""
593
594 #. type: Plain text
595 #: build/C/man3/fts.3:160
596 msgid ""
597 "Any I<FTSENT> structure that represents a file type not explicitly described "
598 "by one of the other I<fts_info> values."
599 msgstr ""
600
601 #. type: TP
602 #: build/C/man3/fts.3:160
603 #, no-wrap
604 msgid "B<FTS_DNR>"
605 msgstr ""
606
607 #. type: Plain text
608 #: build/C/man3/fts.3:166
609 msgid ""
610 "A directory which cannot be read.  This is an error return, and the "
611 "I<fts_errno> field will be set to indicate what caused the error."
612 msgstr ""
613
614 #. type: TP
615 #: build/C/man3/fts.3:166
616 #, no-wrap
617 msgid "B<FTS_DOT>"
618 msgstr ""
619
620 #. type: Plain text
621 #: build/C/man3/fts.3:176
622 msgid ""
623 "A file named \".\" or \"..\" which was not specified as a filename to "
624 "B<fts_open>()  (see B<FTS_SEEDOT>)."
625 msgstr ""
626
627 #. type: TP
628 #: build/C/man3/fts.3:176
629 #, no-wrap
630 msgid "B<FTS_DP>"
631 msgstr ""
632
633 #. type: Plain text
634 #: build/C/man3/fts.3:186
635 msgid ""
636 "A directory being visited in postorder.  The contents of the I<FTSENT> "
637 "structure will be unchanged from when it was returned in preorder, that is, "
638 "with the I<fts_info> field set to B<FTS_D>."
639 msgstr ""
640
641 #. type: TP
642 #: build/C/man3/fts.3:186
643 #, no-wrap
644 msgid "B<FTS_ERR>"
645 msgstr ""
646
647 #. type: Plain text
648 #: build/C/man3/fts.3:191
649 msgid ""
650 "This is an error return, and the I<fts_errno> field will be set to indicate "
651 "what caused the error."
652 msgstr ""
653
654 #. type: TP
655 #: build/C/man3/fts.3:191
656 #, no-wrap
657 msgid "B<FTS_F>"
658 msgstr ""
659
660 #. type: Plain text
661 #: build/C/man3/fts.3:194
662 msgid "A regular file."
663 msgstr ""
664
665 #. type: TP
666 #: build/C/man3/fts.3:194
667 #, no-wrap
668 msgid "B<FTS_NS>"
669 msgstr ""
670
671 #. type: Plain text
672 #: build/C/man3/fts.3:205
673 msgid ""
674 "A file for which no B<stat>(2)  information was available.  The contents of "
675 "the I<fts_statp> field are undefined.  This is an error return, and the "
676 "I<fts_errno> field will be set to indicate what caused the error."
677 msgstr ""
678
679 #. type: TP
680 #: build/C/man3/fts.3:205
681 #, no-wrap
682 msgid "B<FTS_NSOK>"
683 msgstr ""
684
685 #. type: Plain text
686 #: build/C/man3/fts.3:213
687 msgid ""
688 "A file for which no B<stat>(2)  information was requested.  The contents of "
689 "the I<fts_statp> field are undefined."
690 msgstr ""
691
692 #. type: TP
693 #: build/C/man3/fts.3:213
694 #, no-wrap
695 msgid "B<FTS_SL>"
696 msgstr ""
697
698 #. type: Plain text
699 #: build/C/man3/fts.3:216
700 msgid "A symbolic link."
701 msgstr ""
702
703 #. type: TP
704 #: build/C/man3/fts.3:216
705 #, no-wrap
706 msgid "B<FTS_SLNONE>"
707 msgstr ""
708
709 #.  .El
710 #. type: Plain text
711 #: build/C/man3/fts.3:224
712 msgid ""
713 "A symbolic link with a nonexistent target.  The contents of the I<fts_statp> "
714 "field reference the file characteristic information for the symbolic link "
715 "itself."
716 msgstr ""
717
718 #. type: TP
719 #: build/C/man3/fts.3:225
720 #, no-wrap
721 msgid "I<fts_accpath>"
722 msgstr ""
723
724 #. type: Plain text
725 #: build/C/man3/fts.3:228
726 msgid "A path for accessing the file from the current directory."
727 msgstr ""
728
729 #. type: TP
730 #: build/C/man3/fts.3:228
731 #, no-wrap
732 msgid "I<fts_path>"
733 msgstr ""
734
735 #. type: Plain text
736 #: build/C/man3/fts.3:234
737 msgid ""
738 "The path for the file relative to the root of the traversal.  This path "
739 "contains the path specified to B<fts_open>()  as a prefix."
740 msgstr ""
741
742 #. type: TP
743 #: build/C/man3/fts.3:234
744 #, no-wrap
745 msgid "I<fts_pathlen>"
746 msgstr ""
747
748 #. type: Plain text
749 #: build/C/man3/fts.3:238
750 msgid "The length of the string referenced by I<fts_path>."
751 msgstr ""
752
753 #. type: TP
754 #: build/C/man3/fts.3:238
755 #, no-wrap
756 msgid "I<fts_name>"
757 msgstr ""
758
759 #. type: Plain text
760 #: build/C/man3/fts.3:241
761 msgid "The name of the file."
762 msgstr ""
763
764 #. type: TP
765 #: build/C/man3/fts.3:241
766 #, no-wrap
767 msgid "I<fts_namelen>"
768 msgstr ""
769
770 #. type: Plain text
771 #: build/C/man3/fts.3:245
772 msgid "The length of the string referenced by I<fts_name>."
773 msgstr ""
774
775 #. type: TP
776 #: build/C/man3/fts.3:245
777 #, no-wrap
778 msgid "I<fts_level>"
779 msgstr ""
780
781 #. type: Plain text
782 #: build/C/man3/fts.3:256
783 msgid ""
784 "The depth of the traversal, numbered from -1 to N, where this file was "
785 "found.  The I<FTSENT> structure representing the parent of the starting "
786 "point (or root)  of the traversal is numbered -1, and the I<FTSENT> "
787 "structure for the root itself is numbered 0."
788 msgstr ""
789
790 #. type: TP
791 #: build/C/man3/fts.3:256
792 #, no-wrap
793 msgid "I<fts_errno>"
794 msgstr ""
795
796 #. type: Plain text
797 #: build/C/man3/fts.3:279
798 msgid ""
799 "Upon return of a I<FTSENT> structure from the B<fts_children>()  or "
800 "B<fts_read>()  functions, with its I<fts_info> field set to B<FTS_DNR>, "
801 "B<FTS_ERR> or B<FTS_NS>, the I<fts_errno> field contains the value of the "
802 "external variable I<errno> specifying the cause of the error.  Otherwise, "
803 "the contents of the I<fts_errno> field are undefined."
804 msgstr ""
805
806 #. type: TP
807 #: build/C/man3/fts.3:279
808 #, no-wrap
809 msgid "I<fts_number>"
810 msgstr ""
811
812 #. type: Plain text
813 #: build/C/man3/fts.3:285
814 msgid ""
815 "This field is provided for the use of the application program and is not "
816 "modified by the fts functions.  It is initialized to 0."
817 msgstr ""
818
819 #. type: TP
820 #: build/C/man3/fts.3:285
821 #, no-wrap
822 msgid "I<fts_pointer>"
823 msgstr ""
824
825 #. type: Plain text
826 #: build/C/man3/fts.3:292
827 msgid ""
828 "This field is provided for the use of the application program and is not "
829 "modified by the fts functions.  It is initialized to NULL."
830 msgstr ""
831
832 #. type: TP
833 #: build/C/man3/fts.3:292
834 #, no-wrap
835 msgid "I<fts_parent>"
836 msgstr ""
837
838 #. type: Plain text
839 #: build/C/man3/fts.3:306
840 msgid ""
841 "A pointer to the I<FTSENT> structure referencing the file in the hierarchy "
842 "immediately above the current file, that is, the directory of which this "
843 "file is a member.  A parent structure for the initial entry point is "
844 "provided as well, however, only the I<fts_level>, I<fts_number> and "
845 "I<fts_pointer> fields are guaranteed to be initialized."
846 msgstr ""
847
848 #. type: TP
849 #: build/C/man3/fts.3:306
850 #, no-wrap
851 msgid "I<fts_link>"
852 msgstr ""
853
854 #. type: Plain text
855 #: build/C/man3/fts.3:317
856 msgid ""
857 "Upon return from the B<fts_children>()  function, the I<fts_link> field "
858 "points to the next structure in the NULL-terminated linked list of directory "
859 "members.  Otherwise, the contents of the I<fts_link> field are undefined."
860 msgstr ""
861
862 #. type: TP
863 #: build/C/man3/fts.3:317
864 #, no-wrap
865 msgid "I<fts_cycle>"
866 msgstr ""
867
868 #. type: Plain text
869 #: build/C/man3/fts.3:333
870 msgid ""
871 "If a directory causes a cycle in the hierarchy (see B<FTS_DC>), either "
872 "because of a hard link between two directories, or a symbolic link pointing "
873 "to a directory, the I<fts_cycle> field of the structure will point to the "
874 "I<FTSENT> structure in the hierarchy that references the same file as the "
875 "current I<FTSENT> structure.  Otherwise, the contents of the I<fts_cycle> "
876 "field are undefined."
877 msgstr ""
878
879 #. type: TP
880 #: build/C/man3/fts.3:333
881 #, no-wrap
882 msgid "I<fts_statp>"
883 msgstr ""
884
885 #.  .El
886 #. type: Plain text
887 #: build/C/man3/fts.3:339
888 msgid "A pointer to B<stat>(2)  information for the file."
889 msgstr ""
890
891 #. type: Plain text
892 #: build/C/man3/fts.3:366
893 msgid ""
894 "A single buffer is used for all of the paths of all of the files in the file "
895 "hierarchy.  Therefore, the I<fts_path> and I<fts_accpath> fields are "
896 "guaranteed to be null-terminated I<only> for the file most recently returned "
897 "by B<fts_read>().  To use these fields to reference any files represented by "
898 "other I<FTSENT> structures will require that the path buffer be modified "
899 "using the information contained in that I<FTSENT> structure's I<fts_pathlen> "
900 "field.  Any such modifications should be undone before further calls to "
901 "B<fts_read>()  are attempted.  The I<fts_name> field is always "
902 "null-terminated."
903 msgstr ""
904
905 #. type: SS
906 #: build/C/man3/fts.3:366
907 #, no-wrap
908 msgid "fts_open()"
909 msgstr ""
910
911 #. type: Plain text
912 #: build/C/man3/fts.3:374
913 msgid ""
914 "The B<fts_open>()  function takes a pointer to an array of character "
915 "pointers naming one or more paths which make up a logical file hierarchy to "
916 "be traversed.  The array must be terminated by a NULL pointer."
917 msgstr ""
918
919 #.  .Bl -tag -width "FTS_PHYSICAL"
920 #. type: Plain text
921 #: build/C/man3/fts.3:384
922 msgid ""
923 "There are a number of options, at least one of which (either B<FTS_LOGICAL> "
924 "or B<FTS_PHYSICAL>)  must be specified.  The options are selected by ORing "
925 "the following values:"
926 msgstr ""
927
928 #. type: TP
929 #: build/C/man3/fts.3:384
930 #, no-wrap
931 msgid "B<FTS_COMFOLLOW>"
932 msgstr ""
933
934 #. type: Plain text
935 #: build/C/man3/fts.3:390
936 msgid ""
937 "This option causes any symbolic link specified as a root path to be followed "
938 "immediately whether or not B<FTS_LOGICAL> is also specified."
939 msgstr ""
940
941 #. type: TP
942 #: build/C/man3/fts.3:390
943 #, no-wrap
944 msgid "B<FTS_LOGICAL>"
945 msgstr ""
946
947 #. type: Plain text
948 #: build/C/man3/fts.3:409
949 msgid ""
950 "This option causes the fts routines to return I<FTSENT> structures for the "
951 "targets of symbolic links instead of the symbolic links themselves.  If this "
952 "option is set, the only symbolic links for which I<FTSENT> structures are "
953 "returned to the application are those referencing nonexistent files.  Either "
954 "B<FTS_LOGICAL> or B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>()  "
955 "function."
956 msgstr ""
957
958 #. type: TP
959 #: build/C/man3/fts.3:409
960 #, no-wrap
961 msgid "B<FTS_NOCHDIR>"
962 msgstr ""
963
964 #. type: Plain text
965 #: build/C/man3/fts.3:425
966 msgid ""
967 "As a performance optimization, the fts functions change directories as they "
968 "walk the file hierarchy.  This has the side-effect that an application "
969 "cannot rely on being in any particular directory during the traversal.  The "
970 "B<FTS_NOCHDIR> option turns off this optimization, and the fts functions "
971 "will not change the current directory.  Note that applications should not "
972 "themselves change their current directory and try to access files unless "
973 "B<FTS_NOCHDIR> is specified and absolute pathnames were provided as "
974 "arguments to B<fts_open>()."
975 msgstr ""
976
977 #. type: TP
978 #: build/C/man3/fts.3:425
979 #, no-wrap
980 msgid "B<FTS_NOSTAT>"
981 msgstr ""
982
983 #. type: Plain text
984 #: build/C/man3/fts.3:441
985 msgid ""
986 "By default, returned I<FTSENT> structures reference file characteristic "
987 "information (the I<statp> field) for each file visited.  This option relaxes "
988 "that requirement as a performance optimization, allowing the fts functions "
989 "to set the I<fts_info> field to B<FTS_NSOK> and leave the contents of the "
990 "I<statp> field undefined."
991 msgstr ""
992
993 #. type: TP
994 #: build/C/man3/fts.3:441
995 #, no-wrap
996 msgid "B<FTS_PHYSICAL>"
997 msgstr ""
998
999 #. type: Plain text
1000 #: build/C/man3/fts.3:460
1001 msgid ""
1002 "This option causes the fts routines to return I<FTSENT> structures for "
1003 "symbolic links themselves instead of the target files they point to.  If "
1004 "this option is set, I<FTSENT> structures for all symbolic links in the "
1005 "hierarchy are returned to the application.  Either B<FTS_LOGICAL> or "
1006 "B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>()  function."
1007 msgstr ""
1008
1009 #. type: TP
1010 #: build/C/man3/fts.3:460
1011 #, no-wrap
1012 msgid "B<FTS_SEEDOT>"
1013 msgstr ""
1014
1015 #. type: Plain text
1016 #: build/C/man3/fts.3:473
1017 msgid ""
1018 "By default, unless they are specified as path arguments to B<fts_open>(), "
1019 "any files named \".\" or \"..\" encountered in the file hierarchy are "
1020 "ignored.  This option causes the fts routines to return I<FTSENT> structures "
1021 "for them."
1022 msgstr ""
1023
1024 #. type: TP
1025 #: build/C/man3/fts.3:473
1026 #, no-wrap
1027 msgid "B<FTS_XDEV>"
1028 msgstr ""
1029
1030 #.  .El
1031 #. type: Plain text
1032 #: build/C/man3/fts.3:479
1033 msgid ""
1034 "This option prevents fts from descending into directories that have a "
1035 "different device number than the file from which the descent began."
1036 msgstr ""
1037
1038 #. type: Plain text
1039 #: build/C/man3/fts.3:518
1040 msgid ""
1041 "The argument B<compar>()  specifies a user-defined function which may be "
1042 "used to order the traversal of the hierarchy.  It takes two pointers to "
1043 "pointers to I<FTSENT> structures as arguments and should return a negative "
1044 "value, zero, or a positive value to indicate if the file referenced by its "
1045 "first argument comes before, in any order with respect to, or after, the "
1046 "file referenced by its second argument.  The I<fts_accpath>, I<fts_path> and "
1047 "I<fts_pathlen> fields of the I<FTSENT> structures may I<never> be used in "
1048 "this comparison.  If the I<fts_info> field is set to B<FTS_NS> or "
1049 "B<FTS_NSOK>, the I<fts_statp> field may not either.  If the B<compar>()  "
1050 "argument is NULL, the directory traversal order is in the order listed in "
1051 "I<path_argv> for the root paths, and in the order listed in the directory "
1052 "for everything else."
1053 msgstr ""
1054
1055 #. type: SS
1056 #: build/C/man3/fts.3:518
1057 #, no-wrap
1058 msgid "fts_read()"
1059 msgstr ""
1060
1061 #. type: Plain text
1062 #: build/C/man3/fts.3:531
1063 msgid ""
1064 "The B<fts_read>()  function returns a pointer to an I<FTSENT> structure "
1065 "describing a file in the hierarchy.  Directories (that are readable and do "
1066 "not cause cycles) are visited at least twice, once in preorder and once in "
1067 "postorder.  All other files are visited at least once.  (Hard links between "
1068 "directories that do not cause cycles or symbolic links to symbolic links may "
1069 "cause files to be visited more than once, or directories more than twice.)"
1070 msgstr ""
1071
1072 #. type: Plain text
1073 #: build/C/man3/fts.3:552
1074 msgid ""
1075 "If all the members of the hierarchy have been returned, B<fts_read>()  "
1076 "returns NULL and sets the external variable I<errno> to 0.  If an error "
1077 "unrelated to a file in the hierarchy occurs, B<fts_read>()  returns NULL and "
1078 "sets I<errno> appropriately.  If an error related to a returned file occurs, "
1079 "a pointer to an I<FTSENT> structure is returned, and I<errno> may or may not "
1080 "have been set (see I<fts_info>)."
1081 msgstr ""
1082
1083 #. type: Plain text
1084 #: build/C/man3/fts.3:569
1085 msgid ""
1086 "The I<FTSENT> structures returned by B<fts_read>()  may be overwritten after "
1087 "a call to B<fts_close>()  on the same file hierarchy stream, or, after a "
1088 "call to B<fts_read>()  on the same file hierarchy stream unless they "
1089 "represent a file of type directory, in which case they will not be "
1090 "overwritten until after a call to B<fts_read>()  after the I<FTSENT> "
1091 "structure has been returned by the function B<fts_read>()  in postorder."
1092 msgstr ""
1093
1094 #. type: SS
1095 #: build/C/man3/fts.3:569
1096 #, no-wrap
1097 msgid "fts_children()"
1098 msgstr ""
1099
1100 #. type: Plain text
1101 #: build/C/man3/fts.3:587
1102 msgid ""
1103 "The B<fts_children>()  function returns a pointer to an I<FTSENT> structure "
1104 "describing the first entry in a NULL-terminated linked list of the files in "
1105 "the directory represented by the I<FTSENT> structure most recently returned "
1106 "by B<fts_read>().  The list is linked through the I<fts_link> field of the "
1107 "I<FTSENT> structure, and is ordered by the user-specified comparison "
1108 "function, if any.  Repeated calls to B<fts_children>()  will recreate this "
1109 "linked list."
1110 msgstr ""
1111
1112 #. type: Plain text
1113 #: build/C/man3/fts.3:615
1114 msgid ""
1115 "As a special case, if B<fts_read>()  has not yet been called for a "
1116 "hierarchy, B<fts_children>()  will return a pointer to the files in the "
1117 "logical directory specified to B<fts_open>(), that is, the arguments "
1118 "specified to B<fts_open>().  Otherwise, if the I<FTSENT> structure most "
1119 "recently returned by B<fts_read>()  is not a directory being visited in "
1120 "preorder, or the directory does not contain any files, B<fts_children>()  "
1121 "returns NULL and sets I<errno> to zero.  If an error occurs, "
1122 "B<fts_children>()  returns NULL and sets I<errno> appropriately."
1123 msgstr ""
1124
1125 #. type: Plain text
1126 #: build/C/man3/fts.3:626
1127 msgid ""
1128 "The I<FTSENT> structures returned by B<fts_children>()  may be overwritten "
1129 "after a call to B<fts_children>(), B<fts_close>()  or B<fts_read>()  on the "
1130 "same file hierarchy stream."
1131 msgstr ""
1132
1133 #.  .Bl -tag -width FTS_NAMEONLY
1134 #. type: Plain text
1135 #: build/C/man3/fts.3:630
1136 msgid "I<Option> may be set to the following value:"
1137 msgstr ""
1138
1139 #. type: TP
1140 #: build/C/man3/fts.3:630
1141 #, no-wrap
1142 msgid "B<FTS_NAMEONLY>"
1143 msgstr ""
1144
1145 #.  .El
1146 #. type: Plain text
1147 #: build/C/man3/fts.3:640
1148 msgid ""
1149 "Only the names of the files are needed.  The contents of all the fields in "
1150 "the returned linked list of structures are undefined with the exception of "
1151 "the I<fts_name> and I<fts_namelen> fields."
1152 msgstr ""
1153
1154 #. type: SS
1155 #: build/C/man3/fts.3:640
1156 #, no-wrap
1157 msgid "fts_set()"
1158 msgstr ""
1159
1160 #.  .Bl -tag -width FTS_PHYSICAL
1161 #. type: Plain text
1162 #: build/C/man3/fts.3:655
1163 msgid ""
1164 "The function B<fts_set>()  allows the user application to determine further "
1165 "processing for the file I<f> of the stream I<ftsp>.  The B<fts_set>()  "
1166 "function returns 0 on success, and -1 if an error occurs.  I<Option> must be "
1167 "set to one of the following values:"
1168 msgstr ""
1169
1170 #. type: TP
1171 #: build/C/man3/fts.3:655
1172 #, no-wrap
1173 msgid "B<FTS_AGAIN>"
1174 msgstr ""
1175
1176 #. type: Plain text
1177 #: build/C/man3/fts.3:673
1178 msgid ""
1179 "Re-visit the file; any file type may be revisited.  The next call to "
1180 "B<fts_read>()  will return the referenced file.  The I<fts_stat> and "
1181 "I<fts_info> fields of the structure will be reinitialized at that time, but "
1182 "no other fields will have been changed.  This option is meaningful only for "
1183 "the most recently returned file from B<fts_read>().  Normal use is for "
1184 "postorder directory visits, where it causes the directory to be revisited "
1185 "(in both preorder and postorder) as well as all of its descendants."
1186 msgstr ""
1187
1188 #. type: TP
1189 #: build/C/man3/fts.3:673
1190 #, no-wrap
1191 msgid "B<FTS_FOLLOW>"
1192 msgstr ""
1193
1194 #. type: Plain text
1195 #: build/C/man3/fts.3:701
1196 msgid ""
1197 "The referenced file must be a symbolic link.  If the referenced file is the "
1198 "one most recently returned by B<fts_read>(), the next call to B<fts_read>()  "
1199 "returns the file with the I<fts_info> and I<fts_statp> fields reinitialized "
1200 "to reflect the target of the symbolic link instead of the symbolic link "
1201 "itself.  If the file is one of those most recently returned by "
1202 "B<fts_children>(), the I<fts_info> and I<fts_statp> fields of the structure, "
1203 "when returned by B<fts_read>(), will reflect the target of the symbolic link "
1204 "instead of the symbolic link itself.  In either case, if the target of the "
1205 "symbolic link does not exist the fields of the returned structure will be "
1206 "unchanged and the I<fts_info> field will be set to B<FTS_SLNONE>."
1207 msgstr ""
1208
1209 #. type: Plain text
1210 #: build/C/man3/fts.3:705
1211 msgid ""
1212 "If the target of the link is a directory, the preorder return, followed by "
1213 "the return of all of its descendants, followed by a postorder return, is "
1214 "done."
1215 msgstr ""
1216
1217 #. type: TP
1218 #: build/C/man3/fts.3:705
1219 #, no-wrap
1220 msgid "B<FTS_SKIP>"
1221 msgstr ""
1222
1223 #.  .El
1224 #. type: Plain text
1225 #: build/C/man3/fts.3:713
1226 msgid ""
1227 "No descendants of this file are visited.  The file may be one of those most "
1228 "recently returned by either B<fts_children>()  or B<fts_read>()."
1229 msgstr ""
1230
1231 #. type: SS
1232 #: build/C/man3/fts.3:713
1233 #, no-wrap
1234 msgid "fts_close()"
1235 msgstr ""
1236
1237 #. type: Plain text
1238 #: build/C/man3/fts.3:726
1239 msgid ""
1240 "The B<fts_close>()  function closes a file hierarchy stream I<ftsp> and "
1241 "restores the current directory to the directory from which B<fts_open>()  "
1242 "was called to open I<ftsp>.  The B<fts_close>()  function returns 0 on "
1243 "success, and -1 if an error occurs."
1244 msgstr ""
1245
1246 #. type: SH
1247 #: build/C/man3/fts.3:726 build/C/man2/mount.2:284 build/C/man2/spu_create.2:168 build/C/man2/spu_run.2:149 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/sysfs.2:77 build/C/man2/umount.2:104 build/C/man2/ustat.2:75
1248 #, no-wrap
1249 msgid "ERRORS"
1250 msgstr ""
1251
1252 #. type: Plain text
1253 #: build/C/man3/fts.3:735
1254 msgid ""
1255 "The function B<fts_open>()  may fail and set I<errno> for any of the errors "
1256 "specified for B<open>(2)  and B<malloc>(3)."
1257 msgstr ""
1258
1259 #. type: Plain text
1260 #: build/C/man3/fts.3:744
1261 msgid ""
1262 "The function B<fts_close>()  may fail and set I<errno> for any of the errors "
1263 "specified for B<chdir>(2)  and B<close>(2)."
1264 msgstr ""
1265
1266 #. type: Plain text
1267 #: build/C/man3/fts.3:758
1268 msgid ""
1269 "The functions B<fts_read>()  and B<fts_children>()  may fail and set "
1270 "I<errno> for any of the errors specified for B<chdir>(2), B<malloc>(3), "
1271 "B<opendir>(3), B<readdir>(3)  and B<stat>(2)."
1272 msgstr ""
1273
1274 #. type: Plain text
1275 #: build/C/man3/fts.3:767
1276 msgid ""
1277 "In addition, B<fts_children>(), B<fts_open>()  and B<fts_set>()  may fail "
1278 "and set I<errno> as follows:"
1279 msgstr ""
1280
1281 #. type: TP
1282 #: build/C/man3/fts.3:767 build/C/man2/mount.2:320 build/C/man2/spu_create.2:182 build/C/man2/spu_run.2:170 build/C/man2/sysfs.2:82 build/C/man2/umount.2:125 build/C/man2/ustat.2:80
1283 #, no-wrap
1284 msgid "B<EINVAL>"
1285 msgstr ""
1286
1287 #. type: Plain text
1288 #: build/C/man3/fts.3:770
1289 msgid "The options were invalid."
1290 msgstr ""
1291
1292 #. type: SH
1293 #: build/C/man3/fts.3:770 build/C/man2/getxattr.2:132 build/C/man2/listxattr.2:144 build/C/man2/mount.2:378 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:142 build/C/man2/spu_create.2:242 build/C/man2/spu_run.2:184 build/C/man2/umount.2:150
1294 #, no-wrap
1295 msgid "VERSIONS"
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man3/fts.3:772
1300 msgid "These functions are available in Linux since glibc2."
1301 msgstr ""
1302
1303 #. type: SH
1304 #: build/C/man3/fts.3:772 build/C/man3/ftw.3:319 build/C/man3/getfsent.3:109 build/C/man3/getmntent.3:175 build/C/man2/getxattr.2:135 build/C/man2/listxattr.2:147 build/C/man2/mount.2:389 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:145 build/C/man2/spu_create.2:246 build/C/man2/spu_run.2:188 build/C/man2/stat.2:355 build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155 build/C/man2/sysfs.2:90 build/C/man2/umount.2:156 build/C/man2/ustat.2:90
1305 #, no-wrap
1306 msgid "CONFORMING TO"
1307 msgstr ""
1308
1309 #.  The following statement is years old, and seems no closer to
1310 #.  being true -- mtk
1311 #.  The
1312 #.  .I fts
1313 #.  utility is expected to be included in a future
1314 #.  POSIX.1
1315 #.  revision.
1316 #. type: Plain text
1317 #: build/C/man3/fts.3:781
1318 msgid "4.4BSD."
1319 msgstr ""
1320
1321 #. type: Plain text
1322 #: build/C/man3/fts.3:787
1323 msgid "B<find>(1), B<chdir>(2), B<stat>(2), B<ftw>(3), B<qsort>(3)"
1324 msgstr ""
1325
1326 #. type: TH
1327 #: build/C/man3/ftw.3:34
1328 #, no-wrap
1329 msgid "FTW"
1330 msgstr ""
1331
1332 #. type: TH
1333 #: build/C/man3/ftw.3:34
1334 #, no-wrap
1335 msgid "2010-09-20"
1336 msgstr ""
1337
1338 #. type: Plain text
1339 #: build/C/man3/ftw.3:37
1340 msgid "ftw, nftw - file tree walk"
1341 msgstr ""
1342
1343 #. type: Plain text
1344 #: build/C/man3/ftw.3:40
1345 #, no-wrap
1346 msgid "B<#include E<lt>ftw.hE<gt>>\n"
1347 msgstr ""
1348
1349 #. type: Plain text
1350 #: build/C/man3/ftw.3:45
1351 #, no-wrap
1352 msgid ""
1353 "B<int ftw(const char *>I<dirpath>B<,>\n"
1354 "B<        int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1355 "*>I<sb>B<,>\n"
1356 "B<                   int >I<typeflag>B<),>\n"
1357 "B<        int >I<nopenfd>B<);>\n"
1358 msgstr ""
1359
1360 #. type: Plain text
1361 #: build/C/man3/ftw.3:48
1362 #, no-wrap
1363 msgid ""
1364 "B<#define _XOPEN_SOURCE 500>   /* See feature_test_macros(7) */\n"
1365 "B<#include E<lt>ftw.hE<gt>>\n"
1366 msgstr ""
1367
1368 #. type: Plain text
1369 #: build/C/man3/ftw.3:53
1370 #, no-wrap
1371 msgid ""
1372 "B<int nftw(const char *>I<dirpath>B<,>\n"
1373 "B<        int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1374 "*>I<sb>B<,>\n"
1375 "B<                   int >I<typeflag>B<, struct FTW *>I<ftwbuf>B<),>\n"
1376 "B<        int >I<nopenfd>B<, int >I<flags>B<);>\n"
1377 msgstr ""
1378
1379 #. type: Plain text
1380 #: build/C/man3/ftw.3:61
1381 msgid ""
1382 "B<ftw>()  walks through the directory tree that is located under the "
1383 "directory I<dirpath>, and calls I<fn>() once for each entry in the tree.  By "
1384 "default, directories are handled before the files and subdirectories they "
1385 "contain (preorder traversal)."
1386 msgstr ""
1387
1388 #. type: Plain text
1389 #: build/C/man3/ftw.3:74
1390 msgid ""
1391 "To avoid using up all of the calling process's file descriptors, I<nopenfd> "
1392 "specifies the maximum number of directories that B<ftw>()  will hold open "
1393 "simultaneously.  When the search depth exceeds this, B<ftw>()  will become "
1394 "slower because directories have to be closed and reopened.  B<ftw>()  uses "
1395 "at most one file descriptor for each level in the directory tree."
1396 msgstr ""
1397
1398 #. type: Plain text
1399 #: build/C/man3/ftw.3:103
1400 msgid ""
1401 "For each entry found in the tree, B<ftw>()  calls I<fn>() with three "
1402 "arguments: I<fpath>, I<sb>, and I<typeflag>.  I<fpath> is the pathname of "
1403 "the entry, and is expressed either as a pathname relative to the calling "
1404 "process's current working directory at the time of the call to B<ftw>(), if "
1405 "I<dirpath> was expressed as a relative pathname, or as an absolute pathname, "
1406 "if I<dirpath> was expressed as an absolute pathname.  I<sb> is a pointer to "
1407 "the I<stat> structure returned by a call to B<stat>(2)  for I<fpath>.  "
1408 "I<typeflag> is an integer that has one of the following values:"
1409 msgstr ""
1410
1411 #. type: TP
1412 #: build/C/man3/ftw.3:103
1413 #, no-wrap
1414 msgid "B<FTW_F>"
1415 msgstr ""
1416
1417 #. type: Plain text
1418 #: build/C/man3/ftw.3:107
1419 msgid "I<fpath> is a regular file."
1420 msgstr ""
1421
1422 #. type: TP
1423 #: build/C/man3/ftw.3:107
1424 #, no-wrap
1425 msgid "B<FTW_D>"
1426 msgstr ""
1427
1428 #. type: Plain text
1429 #: build/C/man3/ftw.3:111
1430 msgid "I<fpath> is a directory."
1431 msgstr ""
1432
1433 #. type: TP
1434 #: build/C/man3/ftw.3:111
1435 #, no-wrap
1436 msgid "B<FTW_DNR>"
1437 msgstr ""
1438
1439 #. type: Plain text
1440 #: build/C/man3/ftw.3:115
1441 msgid "I<fpath> is a directory which can't be read."
1442 msgstr ""
1443
1444 #. type: TP
1445 #: build/C/man3/ftw.3:115
1446 #, no-wrap
1447 msgid "B<FTW_NS>"
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: build/C/man3/ftw.3:122
1452 msgid "The B<stat>(2)  call failed on I<fpath>, which is not a symbolic link."
1453 msgstr ""
1454
1455 #. type: Plain text
1456 #: build/C/man3/ftw.3:131
1457 msgid ""
1458 "If I<fpath> is a symbolic link and B<stat>(2)  failed, POSIX.1-2001 states "
1459 "that it is undefined whether B<FTW_NS> or B<FTW_SL> (see below)  is passed "
1460 "in I<typeflag>."
1461 msgstr ""
1462
1463 #. type: Plain text
1464 #: build/C/man3/ftw.3:142
1465 msgid ""
1466 "To stop the tree walk, I<fn>() returns a nonzero value; this value will "
1467 "become the return value of B<ftw>().  As long as I<fn>() returns 0, B<ftw>()  "
1468 "will continue either until it has traversed the entire tree, in which case "
1469 "it will return zero, or until it encounters an error (such as a B<malloc>(3)  "
1470 "failure), in which case it will return -1."
1471 msgstr ""
1472
1473 #. type: Plain text
1474 #: build/C/man3/ftw.3:152
1475 msgid ""
1476 "Because B<ftw>()  uses dynamic data structures, the only safe way to exit "
1477 "out of a tree walk is to return a nonzero value from I<fn>().  To allow a "
1478 "signal to terminate the walk without causing a memory leak, have the handler "
1479 "set a global flag that is checked by I<fn>().  I<Don't> use B<longjmp>(3)  "
1480 "unless the program is going to terminate."
1481 msgstr ""
1482
1483 #. type: SS
1484 #: build/C/man3/ftw.3:152
1485 #, no-wrap
1486 msgid "nftw()"
1487 msgstr ""
1488
1489 #. type: Plain text
1490 #: build/C/man3/ftw.3:159
1491 msgid ""
1492 "The function B<nftw>()  is the same as B<ftw>(), except that it has one "
1493 "additional argument, I<flags>, and calls I<fn>() with one more argument, "
1494 "I<ftwbuf>."
1495 msgstr ""
1496
1497 #. type: Plain text
1498 #: build/C/man3/ftw.3:162
1499 msgid ""
1500 "This I<flags> argument is formed by ORing zero or more of the following "
1501 "flags:"
1502 msgstr ""
1503
1504 #. type: TP
1505 #: build/C/man3/ftw.3:162
1506 #, no-wrap
1507 msgid "B<FTW_ACTIONRETVAL> (since glibc 2.3.3)"
1508 msgstr ""
1509
1510 #. type: Plain text
1511 #: build/C/man3/ftw.3:171
1512 msgid ""
1513 "If this glibc-specific flag is set, then B<nftw>()  handles the return value "
1514 "from I<fn>()  differently.  I<fn>()  should return one of the following "
1515 "values:"
1516 msgstr ""
1517
1518 #. type: TP
1519 #: build/C/man3/ftw.3:172
1520 #, no-wrap
1521 msgid "B<FTW_CONTINUE>"
1522 msgstr ""
1523
1524 #. type: Plain text
1525 #: build/C/man3/ftw.3:177
1526 msgid "Instructs B<nftw>()  to continue normally."
1527 msgstr ""
1528
1529 #. type: TP
1530 #: build/C/man3/ftw.3:177
1531 #, no-wrap
1532 msgid "B<FTW_SKIP_SIBLINGS>"
1533 msgstr ""
1534
1535 #.  If \fBFTW_DEPTH\fP
1536 #.  is set, the entry's parent directory is processed next (with
1537 #.  \fIflag\fP set to \fBFTW_DP\fP).
1538 #. type: Plain text
1539 #: build/C/man3/ftw.3:185
1540 msgid ""
1541 "If I<fn>() returns this value, then siblings of the current entry will be "
1542 "skipped, and processing continues in the parent."
1543 msgstr ""
1544
1545 #. type: TP
1546 #: build/C/man3/ftw.3:185
1547 #, no-wrap
1548 msgid "B<FTW_SKIP_SUBTREE>"
1549 msgstr ""
1550
1551 #. type: Plain text
1552 #: build/C/man3/ftw.3:193
1553 msgid ""
1554 "If I<fn>() is called with an entry that is a directory (I<typeflag> is "
1555 "B<FTW_D>), this return value will prevent objects within that directory from "
1556 "being passed as arguments to I<fn>().  B<nftw>()  continues processing with "
1557 "the next sibling of the directory."
1558 msgstr ""
1559
1560 #. type: TP
1561 #: build/C/man3/ftw.3:193
1562 #, no-wrap
1563 msgid "B<FTW_STOP>"
1564 msgstr ""
1565
1566 #. type: Plain text
1567 #: build/C/man3/ftw.3:199
1568 msgid "Causes B<nftw>()  to return immediately with the return value B<FTW_STOP>."
1569 msgstr ""
1570
1571 #. type: Plain text
1572 #: build/C/man3/ftw.3:202
1573 msgid ""
1574 "Other return values could be associated with new actions in the future; "
1575 "I<fn>() should not return values other than those listed above."
1576 msgstr ""
1577
1578 #. type: Plain text
1579 #: build/C/man3/ftw.3:211
1580 msgid ""
1581 "The feature test macro B<_GNU_SOURCE> must be defined (before including "
1582 "I<any> header files)  in order to obtain the definition of "
1583 "B<FTW_ACTIONRETVAL> from I<E<lt>ftw.hE<gt>>."
1584 msgstr ""
1585
1586 #. type: TP
1587 #: build/C/man3/ftw.3:212
1588 #, no-wrap
1589 msgid "B<FTW_CHDIR>"
1590 msgstr ""
1591
1592 #. type: Plain text
1593 #: build/C/man3/ftw.3:219
1594 msgid ""
1595 "If set, do a B<chdir>(2)  to each directory before handling its contents.  "
1596 "This is useful if the program needs to perform some action in the directory "
1597 "in which I<fpath> resides."
1598 msgstr ""
1599
1600 #. type: TP
1601 #: build/C/man3/ftw.3:219
1602 #, no-wrap
1603 msgid "B<FTW_DEPTH>"
1604 msgstr ""
1605
1606 #. type: Plain text
1607 #: build/C/man3/ftw.3:225
1608 msgid ""
1609 "If set, do a post-order traversal, that is, call I<fn>() for the directory "
1610 "itself I<after> handling the contents of the directory and its "
1611 "subdirectories.  (By default, each directory is handled I<before> its "
1612 "contents.)"
1613 msgstr ""
1614
1615 #. type: TP
1616 #: build/C/man3/ftw.3:225
1617 #, no-wrap
1618 msgid "B<FTW_MOUNT>"
1619 msgstr ""
1620
1621 #. type: Plain text
1622 #: build/C/man3/ftw.3:229
1623 msgid "If set, stay within the same file system (i.e., do not cross mount points)."
1624 msgstr ""
1625
1626 #. type: TP
1627 #: build/C/man3/ftw.3:229
1628 #, no-wrap
1629 msgid "B<FTW_PHYS>"
1630 msgstr ""
1631
1632 #. type: Plain text
1633 #: build/C/man3/ftw.3:234
1634 msgid ""
1635 "If set, do not follow symbolic links.  (This is what you want.)  If not set, "
1636 "symbolic links are followed, but no file is reported twice."
1637 msgstr ""
1638
1639 #. type: Plain text
1640 #: build/C/man3/ftw.3:239
1641 msgid ""
1642 "If B<FTW_PHYS> is not set, but B<FTW_DEPTH> is set, then the function "
1643 "I<fn>()  is never called for a directory that would be a descendant of "
1644 "itself."
1645 msgstr ""
1646
1647 #. type: Plain text
1648 #: build/C/man3/ftw.3:254
1649 msgid ""
1650 "For each entry in the directory tree, B<nftw>()  calls I<fn>()  with four "
1651 "arguments.  I<fpath> and I<sb> are as for B<ftw>().  I<typeflag> may receive "
1652 "any of the same values as with B<ftw>(), or any of the following values:"
1653 msgstr ""
1654
1655 #. type: TP
1656 #: build/C/man3/ftw.3:254
1657 #, no-wrap
1658 msgid "B<FTW_DP>"
1659 msgstr ""
1660
1661 #. type: Plain text
1662 #: build/C/man3/ftw.3:260
1663 msgid ""
1664 "I<fpath> is a directory, and B<FTW_DEPTH> was specified in I<flags>.  All of "
1665 "the files and subdirectories within I<fpath> have been processed."
1666 msgstr ""
1667
1668 #. type: TP
1669 #: build/C/man3/ftw.3:260
1670 #, no-wrap
1671 msgid "B<FTW_SL>"
1672 msgstr ""
1673
1674 #.  To obtain the definition of this constant from
1675 #.  .IR <ftw.h> ,
1676 #.  either
1677 #.  .B _BSD_SOURCE
1678 #.  must be defined, or
1679 #.  .BR _XOPEN_SOURCE
1680 #.  must be defined with a value of 500 or more.
1681 #. type: Plain text
1682 #: build/C/man3/ftw.3:271
1683 msgid "I<fpath> is a symbolic link, and B<FTW_PHYS> was set in I<flags>."
1684 msgstr ""
1685
1686 #. type: TP
1687 #: build/C/man3/ftw.3:271
1688 #, no-wrap
1689 msgid "B<FTW_SLN>"
1690 msgstr ""
1691
1692 #. type: Plain text
1693 #: build/C/man3/ftw.3:276
1694 msgid ""
1695 "I<fpath> is a symbolic link pointing to a nonexistent file.  (This occurs "
1696 "only if B<FTW_PHYS> is not set.)"
1697 msgstr ""
1698
1699 #. type: Plain text
1700 #: build/C/man3/ftw.3:282
1701 msgid ""
1702 "The fourth argument that B<nftw>()  supplies when calling I<fn>()  is a "
1703 "structure of type I<FTW>:"
1704 msgstr ""
1705
1706 #. type: Plain text
1707 #: build/C/man3/ftw.3:289
1708 #, no-wrap
1709 msgid ""
1710 "struct FTW {\n"
1711 "    int base;\n"
1712 "    int level;\n"
1713 "};\n"
1714 msgstr ""
1715
1716 #. type: Plain text
1717 #: build/C/man3/ftw.3:302
1718 msgid ""
1719 "I<base> is the offset of the filename (i.e., basename component)  in the "
1720 "pathname given in I<fpath>.  I<level> is the depth of I<fpath> in the "
1721 "directory tree, relative to the root of the tree (I<dirpath>, which has "
1722 "depth 0)."
1723 msgstr ""
1724
1725 #. type: SH
1726 #: build/C/man3/ftw.3:302 build/C/man3/getfsent.3:95 build/C/man3/getmntent.3:148 build/C/man2/getxattr.2:102 build/C/man2/listxattr.2:120 build/C/man2/mount.2:279 build/C/man2/removexattr.2:80 build/C/man2/setxattr.2:107 build/C/man2/spu_create.2:161 build/C/man2/spu_run.2:98 build/C/man2/stat.2:300 build/C/man2/statfs.2:127 build/C/man3/statvfs.3:94 build/C/man2/sysfs.2:65 build/C/man2/umount.2:99 build/C/man2/ustat.2:66
1727 #, no-wrap
1728 msgid "RETURN VALUE"
1729 msgstr ""
1730
1731 #. type: Plain text
1732 #: build/C/man3/ftw.3:304
1733 msgid "These functions return 0 on success, and -1 if an error occurs."
1734 msgstr ""
1735
1736 #. type: Plain text
1737 #: build/C/man3/ftw.3:311
1738 msgid ""
1739 "If I<fn>() returns nonzero, then the tree walk is terminated and the value "
1740 "returned by I<fn>()  is returned as the result of B<ftw>()  or B<nftw>()."
1741 msgstr ""
1742
1743 #. type: Plain text
1744 #: build/C/man3/ftw.3:319
1745 msgid ""
1746 "If B<nftw>()  is called with the B<FTW_ACTIONRETVAL> flag, then the only "
1747 "nonzero value that should be used by I<fn>()  to terminate the tree walk is "
1748 "B<FTW_STOP>, and that value is returned as the result of B<nftw>()."
1749 msgstr ""
1750
1751 #. type: Plain text
1752 #: build/C/man3/ftw.3:324
1753 msgid "POSIX.1-2001, SVr4, SUSv1.  POSIX.1-2008 marks B<ftw>()  as obsolete."
1754 msgstr ""
1755
1756 #. type: SH
1757 #: build/C/man3/ftw.3:324 build/C/man3/getfsent.3:119 build/C/man3/getmntent.3:181 build/C/man2/mount.2:392 build/C/man2/spu_create.2:250 build/C/man2/spu_run.2:192 build/C/man2/stat.2:482 build/C/man2/statfs.2:194 build/C/man3/statvfs.3:157 build/C/man2/sysfs.2:92 build/C/man2/umount.2:159 build/C/man2/ustat.2:94
1758 #, no-wrap
1759 msgid "NOTES"
1760 msgstr ""
1761
1762 #. type: Plain text
1763 #: build/C/man3/ftw.3:328
1764 msgid ""
1765 "POSIX.1-2001 note that the results are unspecified if I<fn> does not "
1766 "preserve the current working directory."
1767 msgstr ""
1768
1769 #. type: Plain text
1770 #: build/C/man3/ftw.3:334
1771 msgid ""
1772 "The function B<nftw>()  and the use of B<FTW_SL> with B<ftw>()  were "
1773 "introduced in SUSv1."
1774 msgstr ""
1775
1776 #. type: Plain text
1777 #: build/C/man3/ftw.3:344
1778 msgid ""
1779 "On some systems B<ftw>()  will never use B<FTW_SL>, on other systems "
1780 "B<FTW_SL> occurs only for symbolic links that do not point to an existing "
1781 "file, and again on other systems B<ftw>()  will use B<FTW_SL> for each "
1782 "symbolic link.  For predictable control, use B<nftw>()."
1783 msgstr ""
1784
1785 #. type: Plain text
1786 #: build/C/man3/ftw.3:348
1787 msgid ""
1788 "Under Linux, libc4 and libc5 and glibc 2.0.6 will use B<FTW_F> for all "
1789 "objects (files, symbolic links, FIFOs, etc.)  that can be stat'ed but are "
1790 "not a directory."
1791 msgstr ""
1792
1793 #. type: Plain text
1794 #: build/C/man3/ftw.3:352
1795 msgid "The function B<nftw>()  is available since glibc 2.1."
1796 msgstr ""
1797
1798 #. type: Plain text
1799 #: build/C/man3/ftw.3:354
1800 msgid "B<FTW_ACTIONRETVAL> is glibc-specific."
1801 msgstr ""
1802
1803 #. type: SH
1804 #: build/C/man3/ftw.3:354 build/C/man2/spu_create.2:260 build/C/man2/spu_run.2:202 build/C/man7/spufs.7:758 build/C/man2/stat.2:573
1805 #, no-wrap
1806 msgid "EXAMPLE"
1807 msgstr ""
1808
1809 #. type: Plain text
1810 #: build/C/man3/ftw.3:363
1811 msgid ""
1812 "The following program traverses the directory tree under the path named in "
1813 "its first command-line argument, or under the current directory if no "
1814 "argument is supplied.  It displays various information about each file.  The "
1815 "second command-line argument can be used to specify characters that control "
1816 "the value assigned to the I<flags> argument when calling B<nftw>()."
1817 msgstr ""
1818
1819 #. type: Plain text
1820 #: build/C/man3/ftw.3:371
1821 #, no-wrap
1822 msgid ""
1823 "#define _XOPEN_SOURCE 500\n"
1824 "#include E<lt>ftw.hE<gt>\n"
1825 "#include E<lt>stdio.hE<gt>\n"
1826 "#include E<lt>stdlib.hE<gt>\n"
1827 "#include E<lt>string.hE<gt>\n"
1828 "#include E<lt>stdint.hE<gt>\n"
1829 msgstr ""
1830
1831 #. type: Plain text
1832 #: build/C/man3/ftw.3:385
1833 #, no-wrap
1834 msgid ""
1835 "static int\n"
1836 "display_info(const char *fpath, const struct stat *sb,\n"
1837 "             int tflag, struct FTW *ftwbuf)\n"
1838 "{\n"
1839 "    printf(\"%-3s %2d %7jd   %-40s %d %s\\en\",\n"
1840 "        (tflag == FTW_D) ?   \"d\"   : (tflag == FTW_DNR) ? \"dnr\" :\n"
1841 "        (tflag == FTW_DP) ?  \"dp\"  : (tflag == FTW_F) ?   \"f\" :\n"
1842 "        (tflag == FTW_NS) ?  \"ns\"  : (tflag == FTW_SL) ?  \"sl\" :\n"
1843 "        (tflag == FTW_SLN) ? \"sln\" : \"???\",\n"
1844 "        ftwbuf-E<gt>level, (intmax_t) sb-E<gt>st_size,\n"
1845 "        fpath, ftwbuf-E<gt>base, fpath + ftwbuf-E<gt>base);\n"
1846 "    return 0;           /* To tell nftw() to continue */\n"
1847 "}\n"
1848 msgstr ""
1849
1850 #. type: Plain text
1851 #: build/C/man3/ftw.3:390
1852 #, no-wrap
1853 msgid ""
1854 "int\n"
1855 "main(int argc, char *argv[])\n"
1856 "{\n"
1857 "    int flags = 0;\n"
1858 msgstr ""
1859
1860 #. type: Plain text
1861 #: build/C/man3/ftw.3:395
1862 #, no-wrap
1863 msgid ""
1864 "    if (argc E<gt> 2 && strchr(argv[2], \\(aqd\\(aq) != NULL)\n"
1865 "        flags |= FTW_DEPTH;\n"
1866 "    if (argc E<gt> 2 && strchr(argv[2], \\(aqp\\(aq) != NULL)\n"
1867 "        flags |= FTW_PHYS;\n"
1868 msgstr ""
1869
1870 #. type: Plain text
1871 #: build/C/man3/ftw.3:403
1872 #, no-wrap
1873 msgid ""
1874 "    if (nftw((argc E<lt> 2) ? \".\" : argv[1], display_info, 20, flags)\n"
1875 "            == -1) {\n"
1876 "        perror(\"nftw\");\n"
1877 "        exit(EXIT_FAILURE);\n"
1878 "    }\n"
1879 "    exit(EXIT_SUCCESS);\n"
1880 "}\n"
1881 msgstr ""
1882
1883 #. type: Plain text
1884 #: build/C/man3/ftw.3:408
1885 msgid "B<stat>(2), B<fts>(3), B<readdir>(3)"
1886 msgstr ""
1887
1888 #. type: TH
1889 #: build/C/man3/getfsent.3:25
1890 #, no-wrap
1891 msgid "GETFSENT"
1892 msgstr ""
1893
1894 #. type: TH
1895 #: build/C/man3/getfsent.3:25
1896 #, no-wrap
1897 msgid "2002-02-28"
1898 msgstr ""
1899
1900 #. type: TH
1901 #: build/C/man3/getfsent.3:25
1902 #, no-wrap
1903 msgid "GNU"
1904 msgstr ""
1905
1906 #. type: Plain text
1907 #: build/C/man3/getfsent.3:28
1908 msgid "getfsent, getfsspec, getfsfile, setfsent, endfsent - handle fstab entries"
1909 msgstr ""
1910
1911 #. type: Plain text
1912 #: build/C/man3/getfsent.3:30
1913 msgid "B<#include E<lt>fstab.hE<gt>>"
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: build/C/man3/getfsent.3:32
1918 msgid "B<void endfsent(void);>"
1919 msgstr ""
1920
1921 #. type: Plain text
1922 #: build/C/man3/getfsent.3:34
1923 msgid "B<struct fstab *getfsent(void);>"
1924 msgstr ""
1925
1926 #. type: Plain text
1927 #: build/C/man3/getfsent.3:36
1928 msgid "B<struct fstab *getfsfile(const char *>I<mount_point>B<);>"
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man3/getfsent.3:38
1933 msgid "B<struct fstab *getfsspec(const char *>I<special_file>B<);>"
1934 msgstr ""
1935
1936 #. type: Plain text
1937 #: build/C/man3/getfsent.3:40
1938 msgid "B<int setfsent(void);>"
1939 msgstr ""
1940
1941 #. type: Plain text
1942 #: build/C/man3/getfsent.3:44
1943 msgid ""
1944 "These functions read from the file I</etc/fstab>.  The I<struct fstab> is "
1945 "defined by:"
1946 msgstr ""
1947
1948 #. type: Plain text
1949 #: build/C/man3/getfsent.3:56
1950 #, no-wrap
1951 msgid ""
1952 "struct fstab {\n"
1953 "    char       *fs_spec;       /* block device name */\n"
1954 "    char       *fs_file;       /* mount point */\n"
1955 "    char       *fs_vfstype;    /* file-sysem type */\n"
1956 "    char       *fs_mntops;     /* mount options */\n"
1957 "    const char *fs_type;       /* rw/rq/ro/sw/xx option */\n"
1958 "    int         fs_freq;       /* dump frequency, in days */\n"
1959 "    int         fs_passno;     /* pass number on parallel dump */\n"
1960 "};\n"
1961 msgstr ""
1962
1963 #. type: Plain text
1964 #: build/C/man3/getfsent.3:64
1965 msgid ""
1966 "Here the field I<fs_type> contains (on a *BSD system)  one of the five "
1967 "strings \"rw\", \"rq\", \"ro\", \"sw\", \"xx\" (read-write, read-write with "
1968 "quota, read-only, swap, ignore)."
1969 msgstr ""
1970
1971 #. type: Plain text
1972 #: build/C/man3/getfsent.3:68
1973 msgid ""
1974 "The function B<setfsent>()  opens the file when required and positions it at "
1975 "the first line."
1976 msgstr ""
1977
1978 #. type: Plain text
1979 #: build/C/man3/getfsent.3:73
1980 msgid ""
1981 "The function B<getfsent>()  parses the next line from the file.  (After "
1982 "opening it when required.)"
1983 msgstr ""
1984
1985 #. type: Plain text
1986 #: build/C/man3/getfsent.3:77
1987 msgid "The function B<endfsent>()  closes the file when required."
1988 msgstr ""
1989
1990 #. type: Plain text
1991 #: build/C/man3/getfsent.3:86
1992 msgid ""
1993 "The function B<getfsspec>()  searches the file from the start and returns "
1994 "the first entry found for which the I<fs_spec> field matches the "
1995 "I<special_file> argument."
1996 msgstr ""
1997
1998 #. type: Plain text
1999 #: build/C/man3/getfsent.3:95
2000 msgid ""
2001 "The function B<getfsfile>()  searches the file from the start and returns "
2002 "the first entry found for which the I<fs_file> field matches the "
2003 "I<mount_point> argument."
2004 msgstr ""
2005
2006 #.  .SH HISTORY
2007 #.  The
2008 #.  .BR getfsent ()
2009 #.  function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
2010 #. type: Plain text
2011 #: build/C/man3/getfsent.3:109
2012 msgid ""
2013 "Upon success, the functions B<getfsent>(), B<getfsfile>(), and "
2014 "B<getfsspec>()  return a pointer to a I<struct fstab>, while B<setfsent>()  "
2015 "returns 1.  Upon failure or end-of-file, these functions return NULL and 0, "
2016 "respectively."
2017 msgstr ""
2018
2019 #. type: Plain text
2020 #: build/C/man3/getfsent.3:119
2021 msgid ""
2022 "These functions are not in POSIX.1-2001.  Several operating systems have "
2023 "them, e.g., *BSD, SunOS, Digital UNIX, AIX (which also has a "
2024 "B<getfstype>()).  HP-UX has functions of the same names, that however use a "
2025 "I<struct checklist> instead of a I<struct fstab>, and calls these functions "
2026 "obsolete, superseded by B<getmntent>(3)."
2027 msgstr ""
2028
2029 #. type: Plain text
2030 #: build/C/man3/getfsent.3:121
2031 msgid "These functions are not thread-safe."
2032 msgstr ""
2033
2034 #. type: Plain text
2035 #: build/C/man3/getfsent.3:131
2036 msgid ""
2037 "Since Linux allows mounting a block special device in several places, and "
2038 "since several devices can have the same mount point, where the last device "
2039 "with a given mount point is the interesting one, while B<getfsfile>()  and "
2040 "B<getfsspec>()  only return the first occurrence, these two functions are "
2041 "not suitable for use under Linux."
2042 msgstr ""
2043
2044 #. type: Plain text
2045 #: build/C/man3/getfsent.3:134
2046 msgid "B<getmntent>(3), B<fstab>(5)"
2047 msgstr ""
2048
2049 #. type: TH
2050 #: build/C/man3/getmntent.3:30
2051 #, no-wrap
2052 msgid "GETMNTENT"
2053 msgstr ""
2054
2055 #. type: TH
2056 #: build/C/man3/getmntent.3:30
2057 #, no-wrap
2058 msgid "2009-09-15"
2059 msgstr ""
2060
2061 #. type: Plain text
2062 #: build/C/man3/getmntent.3:34
2063 msgid ""
2064 "getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r - get "
2065 "file system descriptor file entry"
2066 msgstr ""
2067
2068 #. type: Plain text
2069 #: build/C/man3/getmntent.3:38
2070 #, no-wrap
2071 msgid ""
2072 "B<#include E<lt>stdio.hE<gt>>\n"
2073 "B<#include E<lt>mntent.hE<gt>>\n"
2074 msgstr ""
2075
2076 #. type: Plain text
2077 #: build/C/man3/getmntent.3:40
2078 #, no-wrap
2079 msgid "B<FILE *setmntent(const char *>I<filename>B<, const char *>I<type>B<);>\n"
2080 msgstr ""
2081
2082 #. type: Plain text
2083 #: build/C/man3/getmntent.3:42
2084 #, no-wrap
2085 msgid "B<struct mntent *getmntent(FILE *>I<fp>B<);>\n"
2086 msgstr ""
2087
2088 #. type: Plain text
2089 #: build/C/man3/getmntent.3:44
2090 #, no-wrap
2091 msgid "B<int addmntent(FILE *>I<fp>B<, const struct mntent *>I<mnt>B<);>\n"
2092 msgstr ""
2093
2094 #. type: Plain text
2095 #: build/C/man3/getmntent.3:46
2096 #, no-wrap
2097 msgid "B<int endmntent(FILE *>I<fp>B<);>\n"
2098 msgstr ""
2099
2100 #. type: Plain text
2101 #: build/C/man3/getmntent.3:48
2102 #, no-wrap
2103 msgid "B<char *hasmntopt(const struct mntent *>I<mnt>B<, const char *>I<opt>B<);>\n"
2104 msgstr ""
2105
2106 #. type: Plain text
2107 #: build/C/man3/getmntent.3:51
2108 #, no-wrap
2109 msgid ""
2110 "/* GNU extension */\n"
2111 "B<#include E<lt>mntent.hE<gt>>\n"
2112 msgstr ""
2113
2114 #. type: Plain text
2115 #: build/C/man3/getmntent.3:54
2116 #, no-wrap
2117 msgid ""
2118 "B<struct mntent *getmntent_r(FILE *>I<fp>B<, struct mntent *>I<mntbuf>B<,>\n"
2119 "B<                           char *>I<buf>B<, int >I<buflen>B<);>\n"
2120 msgstr ""
2121
2122 #. type: Plain text
2123 #: build/C/man3/getmntent.3:59 build/C/man2/stat.2:59
2124 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2125 msgstr ""
2126
2127 #. type: Plain text
2128 #: build/C/man3/getmntent.3:63
2129 msgid "B<getmntent_r>(): _BSD_SOURCE || _SVID_SOURCE"
2130 msgstr ""
2131
2132 #. type: Plain text
2133 #: build/C/man3/getmntent.3:67
2134 msgid ""
2135 "These routines are used to access the file system description file "
2136 "I</etc/fstab> and the mounted file system description file I</etc/mtab>."
2137 msgstr ""
2138
2139 #. type: Plain text
2140 #: build/C/man3/getmntent.3:76
2141 msgid ""
2142 "The B<setmntent>()  function opens the file system description file "
2143 "I<filename> and returns a file pointer which can be used by B<getmntent>().  "
2144 "The argument I<type> is the type of access required and can take the same "
2145 "values as the I<mode> argument of B<fopen>(3)."
2146 msgstr ""
2147
2148 #. type: Plain text
2149 #: build/C/man3/getmntent.3:86
2150 msgid ""
2151 "The B<getmntent>()  function reads the next line from the file system "
2152 "description file I<fp> and returns a pointer to a structure containing the "
2153 "broken out fields from a line in the file.  The pointer points to a static "
2154 "area of memory which is overwritten by subsequent calls to B<getmntent>()."
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man3/getmntent.3:93
2159 msgid ""
2160 "The B<addmntent>()  function adds the I<mntent> structure I<mnt> to the end "
2161 "of the open file I<fp>."
2162 msgstr ""
2163
2164 #. type: Plain text
2165 #: build/C/man3/getmntent.3:98
2166 msgid "The B<endmntent>()  function closes the file system description file I<fp>."
2167 msgstr ""
2168
2169 #. type: Plain text
2170 #: build/C/man3/getmntent.3:108
2171 msgid ""
2172 "The B<hasmntopt>()  function scans the I<mnt_opts> field (see below)  of the "
2173 "I<mntent> structure I<mnt> for a substring that matches I<opt>.  See "
2174 "I<E<lt>mntent.hE<gt>> and B<mount>(8)  for valid mount options."
2175 msgstr ""
2176
2177 #. type: Plain text
2178 #: build/C/man3/getmntent.3:120
2179 msgid ""
2180 "The reentrant B<getmntent_r>()  function is similar to B<getmntent>(), but "
2181 "stores the I<struct mount> in the provided I<*mntbuf> and stores the strings "
2182 "pointed to by the entries in that struct in the provided array I<buf> of "
2183 "size I<buflen>."
2184 msgstr ""
2185
2186 #. type: Plain text
2187 #: build/C/man3/getmntent.3:122
2188 msgid "The I<mntent> structure is defined in I<E<lt>mntent.hE<gt>> as follows:"
2189 msgstr ""
2190
2191 #. type: Plain text
2192 #: build/C/man3/getmntent.3:133
2193 #, no-wrap
2194 msgid ""
2195 "struct mntent {\n"
2196 "    char *mnt_fsname;   /* name of mounted file system */\n"
2197 "    char *mnt_dir;      /* file system path prefix */\n"
2198 "    char *mnt_type;     /* mount type (see mntent.h) */\n"
2199 "    char *mnt_opts;     /* mount options (see mntent.h) */\n"
2200 "    int   mnt_freq;     /* dump frequency in days */\n"
2201 "    int   mnt_passno;   /* pass number on parallel fsck */\n"
2202 "};\n"
2203 msgstr ""
2204
2205 #. type: Plain text
2206 #: build/C/man3/getmntent.3:148
2207 msgid ""
2208 "Since fields in the mtab and fstab files are separated by whitespace, octal "
2209 "escapes are used to represent the four characters space (\\e040), tab "
2210 "(\\e011), newline (\\e012) and backslash (\\e134) in those files when they "
2211 "occur in one of the four strings in a I<mntent> structure.  The routines "
2212 "B<addmntent>()  and B<getmntent>()  will convert from string representation "
2213 "to escaped representation and back."
2214 msgstr ""
2215
2216 #. type: Plain text
2217 #: build/C/man3/getmntent.3:157
2218 msgid ""
2219 "The B<getmntent>()  and B<getmntent_r>()  functions return a pointer to the "
2220 "I<mntent> structure or NULL on failure."
2221 msgstr ""
2222
2223 #. type: Plain text
2224 #: build/C/man3/getmntent.3:161
2225 msgid "The B<addmntent>()  function returns 0 on success and 1 on failure."
2226 msgstr ""
2227
2228 #. type: Plain text
2229 #: build/C/man3/getmntent.3:165
2230 msgid "The B<endmntent>()  function always returns 1."
2231 msgstr ""
2232
2233 #. type: Plain text
2234 #: build/C/man3/getmntent.3:170
2235 msgid ""
2236 "The B<hasmntopt>()  function returns the address of the substring if a match "
2237 "is found and NULL otherwise."
2238 msgstr ""
2239
2240 #. type: SH
2241 #: build/C/man3/getmntent.3:170 build/C/man2/spu_create.2:236
2242 #, no-wrap
2243 msgid "FILES"
2244 msgstr ""
2245
2246 #. type: Plain text
2247 #: build/C/man3/getmntent.3:174
2248 #, no-wrap
2249 msgid ""
2250 "/etc/fstab          file system description file\n"
2251 "/etc/mtab           mounted file system description file\n"
2252 msgstr ""
2253
2254 #. type: Plain text
2255 #: build/C/man3/getmntent.3:181
2256 msgid ""
2257 "The nonreentrant functions are from SunOS 4.1.3.  A routine B<getmntent_r>()  "
2258 "was introduced in HP-UX 10, but it returns an int.  The prototype shown "
2259 "above is glibc-only."
2260 msgstr ""
2261
2262 #. type: Plain text
2263 #: build/C/man3/getmntent.3:193
2264 msgid ""
2265 "System V also has a B<getmntent>()  function but the calling sequence "
2266 "differs, and the returned structure is different.  Under System V "
2267 "I</etc/mnttab> is used.  4.4BSD and Digital UNIX have a routine "
2268 "B<getmntinfo>(), a wrapper around the system call B<getfsstat>()."
2269 msgstr ""
2270
2271 #. type: Plain text
2272 #: build/C/man3/getmntent.3:197
2273 msgid "B<fopen>(3), B<fstab>(5), B<mount>(8)"
2274 msgstr ""
2275
2276 #. type: TH
2277 #: build/C/man2/getxattr.2:27
2278 #, no-wrap
2279 msgid "GETXATTR"
2280 msgstr ""
2281
2282 #. type: TH
2283 #: build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/removexattr.2:27
2284 #, no-wrap
2285 msgid "2001-12-01"
2286 msgstr ""
2287
2288 #. type: Plain text
2289 #: build/C/man2/getxattr.2:30
2290 msgid "getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value"
2291 msgstr ""
2292
2293 #. type: Plain text
2294 #: build/C/man2/getxattr.2:35 build/C/man2/listxattr.2:35 build/C/man2/removexattr.2:35 build/C/man2/setxattr.2:35
2295 #, no-wrap
2296 msgid ""
2297 "B<#include E<lt>sys/types.hE<gt>>\n"
2298 "B<#include E<lt>attr/xattr.hE<gt>>\n"
2299 msgstr ""
2300
2301 #. type: Plain text
2302 #: build/C/man2/getxattr.2:42
2303 #, no-wrap
2304 msgid ""
2305 "B<ssize_t getxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2306 "B<                 void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2307 "B<ssize_t lgetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2308 "B<                 void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2309 "B<ssize_t fgetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
2310 "B<                 void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man2/getxattr.2:55 build/C/man2/setxattr.2:55
2315 msgid ""
2316 "Extended attributes are I<name>:I<value> pairs associated with inodes "
2317 "(files, directories, symbolic links, etc.).  They are extensions to the "
2318 "normal attributes which are associated with all inodes in the system (i.e., "
2319 "the B<stat>(2)  data).  A complete overview of extended attributes concepts "
2320 "can be found in B<attr>(5)."
2321 msgstr ""
2322
2323 #. type: Plain text
2324 #: build/C/man2/getxattr.2:67
2325 msgid ""
2326 "B<getxattr>()  retrieves the I<value> of the extended attribute identified "
2327 "by I<name> and associated with the given I<path> in the file system.  The "
2328 "length of the attribute I<value> is returned."
2329 msgstr ""
2330
2331 #. type: Plain text
2332 #: build/C/man2/getxattr.2:73
2333 msgid ""
2334 "B<lgetxattr>()  is identical to B<getxattr>(), except in the case of a "
2335 "symbolic link, where the link itself is interrogated, not the file that it "
2336 "refers to."
2337 msgstr ""
2338
2339 #. type: Plain text
2340 #: build/C/man2/getxattr.2:83
2341 msgid ""
2342 "B<fgetxattr>()  is identical to B<getxattr>(), only the open file referred "
2343 "to by I<fd> (as returned by B<open>(2))  is interrogated in place of "
2344 "I<path>."
2345 msgstr ""
2346
2347 #. type: Plain text
2348 #: build/C/man2/getxattr.2:91
2349 msgid ""
2350 "An extended attribute I<name> is a simple null-terminated string.  The name "
2351 "includes a namespace prefix; there may be several, disjoint namespaces "
2352 "associated with an individual inode.  The value of an extended attribute is "
2353 "a chunk of arbitrary textual or binary data of specified length."
2354 msgstr ""
2355
2356 #. type: Plain text
2357 #: build/C/man2/getxattr.2:98
2358 msgid ""
2359 "An empty buffer of I<size> zero can be passed into these calls to return the "
2360 "current size of the named extended attribute, which can be used to estimate "
2361 "the size of a buffer which is sufficiently large to hold the value "
2362 "associated with the extended attribute."
2363 msgstr ""
2364
2365 #. type: Plain text
2366 #: build/C/man2/getxattr.2:102
2367 msgid ""
2368 "The interface is designed to allow guessing of initial buffer sizes, and to "
2369 "enlarge buffers when the return value indicates that the buffer provided was "
2370 "too small."
2371 msgstr ""
2372
2373 #. type: Plain text
2374 #: build/C/man2/getxattr.2:108
2375 msgid ""
2376 "On success, a positive number is returned indicating the size of the "
2377 "extended attribute value.  On failure, -1 is returned and I<errno> is set "
2378 "appropriately."
2379 msgstr ""
2380
2381 #. type: Plain text
2382 #: build/C/man2/getxattr.2:114
2383 msgid ""
2384 "If the named attribute does not exist, or the process has no access to this "
2385 "attribute, I<errno> is set to B<ENOATTR>."
2386 msgstr ""
2387
2388 #. type: Plain text
2389 #: build/C/man2/getxattr.2:123
2390 msgid ""
2391 "If the I<size> of the I<value> buffer is too small to hold the result, "
2392 "I<errno> is set to B<ERANGE>."
2393 msgstr ""
2394
2395 #. type: Plain text
2396 #: build/C/man2/getxattr.2:128 build/C/man2/listxattr.2:140 build/C/man2/removexattr.2:95 build/C/man2/setxattr.2:138
2397 msgid ""
2398 "If extended attributes are not supported by the file system, or are "
2399 "disabled, I<errno> is set to B<ENOTSUP>."
2400 msgstr ""
2401
2402 #. type: Plain text
2403 #: build/C/man2/getxattr.2:132 build/C/man2/listxattr.2:144 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:142
2404 msgid ""
2405 "The errors documented for the B<stat>(2)  system call are also applicable "
2406 "here."
2407 msgstr ""
2408
2409 #. type: Plain text
2410 #: build/C/man2/getxattr.2:135 build/C/man2/listxattr.2:147 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:145
2411 msgid ""
2412 "These system calls have been available on Linux since kernel 2.4; glibc "
2413 "support is provided since version 2.3."
2414 msgstr ""
2415
2416 #.  .SH AUTHORS
2417 #.  Andreas Gruenbacher,
2418 #.  .RI < a.gruenbacher@computer.org >
2419 #.  and the SGI XFS development team,
2420 #.  .RI < linux-xfs@oss.sgi.com >.
2421 #.  Please send any bug reports or comments to these addresses.
2422 #. type: Plain text
2423 #: build/C/man2/getxattr.2:143 build/C/man2/listxattr.2:155 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:153
2424 msgid "These system calls are Linux-specific."
2425 msgstr ""
2426
2427 #. type: Plain text
2428 #: build/C/man2/getxattr.2:153
2429 msgid ""
2430 "B<getfattr>(1), B<setfattr>(1), B<listxattr>(2), B<open>(2), "
2431 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2432 msgstr ""
2433
2434 #. type: TH
2435 #: build/C/man2/listxattr.2:27
2436 #, no-wrap
2437 msgid "LISTXATTR"
2438 msgstr ""
2439
2440 #. type: Plain text
2441 #: build/C/man2/listxattr.2:30
2442 msgid "listxattr, llistxattr, flistxattr - list extended attribute names"
2443 msgstr ""
2444
2445 #. type: Plain text
2446 #: build/C/man2/listxattr.2:41
2447 #, no-wrap
2448 msgid ""
2449 "B<ssize_t listxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2450 ">I<size>B<);>\n"
2451 "B<ssize_t llistxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2452 ">I<size>B<);>\n"
2453 "B<ssize_t flistxattr(int >I<fd>B<, char\\ *>I<list>B<, size_t "
2454 ">I<size>B<);>\n"
2455 msgstr ""
2456
2457 #. type: Plain text
2458 #: build/C/man2/listxattr.2:52
2459 msgid ""
2460 "Extended attributes are name:value pairs associated with inodes (files, "
2461 "directories, symbolic links, etc.).  They are extensions to the normal "
2462 "attributes which are associated with all inodes in the system (i.e., the "
2463 "B<stat>(2)  data).  A complete overview of extended attributes concepts can "
2464 "be found in B<attr>(5)."
2465 msgstr ""
2466
2467 #. type: Plain text
2468 #: build/C/man2/listxattr.2:65
2469 msgid ""
2470 "B<listxattr>()  retrieves the I<list> of extended attribute names associated "
2471 "with the given I<path> in the file system.  The list is the set of "
2472 "(null-terminated) names, one after the other.  Names of extended attributes "
2473 "to which the calling process does not have access may be omitted from the "
2474 "list.  The length of the attribute name I<list> is returned."
2475 msgstr ""
2476
2477 #. type: Plain text
2478 #: build/C/man2/listxattr.2:72
2479 msgid ""
2480 "B<llistxattr>()  is identical to B<listxattr>(), except in the case of a "
2481 "symbolic link, where the list of names of extended attributes associated "
2482 "with the link itself is retrieved, not the file that it refers to."
2483 msgstr ""
2484
2485 #. type: Plain text
2486 #: build/C/man2/listxattr.2:82
2487 msgid ""
2488 "B<flistxattr>()  is identical to B<listxattr>(), only the open file referred "
2489 "to by I<fd> (as returned by B<open>(2))  is interrogated in place of "
2490 "I<path>."
2491 msgstr ""
2492
2493 #. type: Plain text
2494 #: build/C/man2/listxattr.2:88
2495 msgid ""
2496 "A single extended attribute I<name> is a simple null-terminated string.  The "
2497 "name includes a namespace prefix; there may be several, disjoint namespaces "
2498 "associated with an individual inode."
2499 msgstr ""
2500
2501 #. type: Plain text
2502 #: build/C/man2/listxattr.2:94
2503 msgid ""
2504 "An empty buffer of I<size> zero can be passed into these calls to return the "
2505 "current size of the list of extended attribute names, which can be used to "
2506 "estimate the size of a buffer which is sufficiently large to hold the list "
2507 "of names."
2508 msgstr ""
2509
2510 #. type: SS
2511 #: build/C/man2/listxattr.2:94
2512 #, no-wrap
2513 msgid "Example"
2514 msgstr ""
2515
2516 #. type: Plain text
2517 #: build/C/man2/listxattr.2:99
2518 msgid ""
2519 "The I<list> of names is returned as an unordered array of null-terminated "
2520 "character strings (attribute names are separated by null bytes "
2521 "(\\(aq\\e0\\(aq)), like this:"
2522 msgstr ""
2523
2524 #. type: Plain text
2525 #: build/C/man2/listxattr.2:104
2526 #, no-wrap
2527 msgid "user.name1\\e0system.name1\\e0user.name2\\e0\n"
2528 msgstr ""
2529
2530 #. type: Plain text
2531 #: build/C/man2/listxattr.2:112
2532 msgid ""
2533 "Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using "
2534 "extended attributes, might return a I<list> like this:"
2535 msgstr ""
2536
2537 #. type: Plain text
2538 #: build/C/man2/listxattr.2:117
2539 #, no-wrap
2540 msgid "system.posix_acl_access\\e0system.posix_acl_default\\e0\n"
2541 msgstr ""
2542
2543 #. type: Plain text
2544 #: build/C/man2/listxattr.2:126
2545 msgid ""
2546 "On success, a positive number is returned indicating the size of the "
2547 "extended attribute name list.  On failure, -1 is returned and I<errno> is "
2548 "set appropriately."
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man2/listxattr.2:135
2553 msgid ""
2554 "If the I<size> of the I<list> buffer is too small to hold the result, "
2555 "I<errno> is set to B<ERANGE>."
2556 msgstr ""
2557
2558 #. type: Plain text
2559 #: build/C/man2/listxattr.2:165
2560 msgid ""
2561 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<open>(2), "
2562 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2563 msgstr ""
2564
2565 #. type: TH
2566 #: build/C/man2/mount.2:40
2567 #, no-wrap
2568 msgid "MOUNT"
2569 msgstr ""
2570
2571 #. type: TH
2572 #: build/C/man2/mount.2:40
2573 #, no-wrap
2574 msgid "2012-01-18"
2575 msgstr ""
2576
2577 #. type: Plain text
2578 #: build/C/man2/mount.2:43
2579 msgid "mount - mount file system"
2580 msgstr ""
2581
2582 #. type: Plain text
2583 #: build/C/man2/mount.2:46 build/C/man2/umount.2:36
2584 #, no-wrap
2585 msgid "B<#include E<lt>sys/mount.hE<gt>>\n"
2586 msgstr ""
2587
2588 #. type: Plain text
2589 #: build/C/man2/mount.2:50
2590 #, no-wrap
2591 msgid ""
2592 "B<int mount(const char *>I<source>B<, const char *>I<target>B<,>\n"
2593 "B<          const char *>I<filesystemtype>B<, unsigned long "
2594 ">I<mountflags>B<,>\n"
2595 "B<          const void *>I<data>B<);>\n"
2596 msgstr ""
2597
2598 #. type: Plain text
2599 #: build/C/man2/mount.2:58
2600 msgid ""
2601 "B<mount>()  attaches the file system specified by I<source> (which is often "
2602 "a device name, but can also be a directory name or a dummy) to the directory "
2603 "specified by I<target>."
2604 msgstr ""
2605
2606 #. type: Plain text
2607 #: build/C/man2/mount.2:62
2608 msgid ""
2609 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
2610 "to mount file systems."
2611 msgstr ""
2612
2613 #.  Multiple mounts on same mount point: since 2.3.99pre7.
2614 #. type: Plain text
2615 #: build/C/man2/mount.2:67
2616 msgid ""
2617 "Since Linux 2.4 a single file system can be visible at multiple mount "
2618 "points, and multiple mounts can be stacked on the same mount point."
2619 msgstr ""
2620
2621 #. type: Plain text
2622 #: build/C/man2/mount.2:76
2623 msgid ""
2624 "Values for the I<filesystemtype> argument supported by the kernel are listed "
2625 "in I</proc/filesystems> (like \"minix\", \"ext2\", \"ext3\", \"jfs\", "
2626 "\"xfs\", \"reiserfs\", \"msdos\", \"proc\", \"nfs\", \"iso9660\" etc.).  "
2627 "Further types may become available when the appropriate modules are loaded."
2628 msgstr ""
2629
2630 #.  FIXME 2.6.15 added flags for "shared subtree" functionality:
2631 #.  MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
2632 #.  These need to be documented on this page.
2633 #.  See:
2634 #.  Documentation/filesystems/sharedsubtree.txt
2635 #
2636 #.  http://lwn.net/Articles/159077/
2637 #
2638 #.  http://myweb.sudhaa.com:2022/~ram/sharedsubtree/paper/sharedsubtree.1.pdf
2639 #.  Shared-Subtree Concept, Implementation, and Applications in Linux
2640 #.  Al Viro viro@ftp.linux.org.uk
2641 #.  Ram Pai linuxram@us.ibm.com
2642 #
2643 #.  http://foss.in/2005/slides/sharedsubtree1.pdf
2644 #.  Shared Subtree Concept and Implementation in the Linux Kernel
2645 #.  Ram Pai
2646 #
2647 #.  2.6.25 Added MS_I_VERSION, which needs to be documented.
2648 #. type: Plain text
2649 #: build/C/man2/mount.2:103
2650 msgid ""
2651 "The I<mountflags> argument may have the magic number 0xC0ED (B<MS_MGC_VAL>)  "
2652 "in the top 16 bits (this was required in kernel versions prior to 2.4, but "
2653 "is no longer required and ignored if specified), and various mount flags (as "
2654 "defined in I<E<lt>linux/fs.hE<gt>> for libc4 and libc5 and in "
2655 "I<E<lt>sys/mount.hE<gt>> for glibc2) in the low order 16 bits:"
2656 msgstr ""
2657
2658 #. type: TP
2659 #: build/C/man2/mount.2:103
2660 #, no-wrap
2661 msgid "B<MS_BIND> (Linux 2.4 onward)"
2662 msgstr ""
2663
2664 #.  since 2.4.0-test9
2665 #.  with the exception of the "hidden" MS_REC mountflags bit
2666 #. type: Plain text
2667 #: build/C/man2/mount.2:122
2668 msgid ""
2669 "Perform a bind mount, making a file or a directory subtree visible at "
2670 "another point within a file system.  Bind mounts may cross file system "
2671 "boundaries and span B<chroot>(2)  jails.  The I<filesystemtype> and I<data> "
2672 "arguments are ignored.  Up until Linux 2.6.26, I<mountflags> was also "
2673 "ignored (the bind mount has the same mount options as the underlying mount "
2674 "point)."
2675 msgstr ""
2676
2677 #. type: TP
2678 #: build/C/man2/mount.2:122
2679 #, no-wrap
2680 msgid "B<MS_DIRSYNC> (since Linux 2.5.19)"
2681 msgstr ""
2682
2683 #. type: Plain text
2684 #: build/C/man2/mount.2:128
2685 msgid ""
2686 "Make directory changes on this file system synchronous.  (This property can "
2687 "be obtained for individual directories or subtrees using B<chattr>(1).)"
2688 msgstr ""
2689
2690 #. type: TP
2691 #: build/C/man2/mount.2:128
2692 #, no-wrap
2693 msgid "B<MS_MANDLOCK>"
2694 msgstr ""
2695
2696 #.  FIXME Say more about MS_MOVE
2697 #. type: Plain text
2698 #: build/C/man2/mount.2:135
2699 msgid ""
2700 "Permit mandatory locking on files in this file system.  (Mandatory locking "
2701 "must still be enabled on a per-file basis, as described in B<fcntl>(2).)"
2702 msgstr ""
2703
2704 #. type: TP
2705 #: build/C/man2/mount.2:135
2706 #, no-wrap
2707 msgid "B<MS_MOVE>"
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man2/mount.2:146
2712 msgid ""
2713 "Move a subtree.  I<source> specifies an existing mount point and I<target> "
2714 "specifies the new location.  The move is atomic: at no point is the subtree "
2715 "unmounted.  The I<filesystemtype>, I<mountflags>, and I<data> arguments are "
2716 "ignored."
2717 msgstr ""
2718
2719 #. type: TP
2720 #: build/C/man2/mount.2:146
2721 #, no-wrap
2722 msgid "B<MS_NOATIME>"
2723 msgstr ""
2724
2725 #. type: Plain text
2726 #: build/C/man2/mount.2:149
2727 msgid "Do not update access times for (all types of) files on this file system."
2728 msgstr ""
2729
2730 #. type: TP
2731 #: build/C/man2/mount.2:149
2732 #, no-wrap
2733 msgid "B<MS_NODEV>"
2734 msgstr ""
2735
2736 #. type: Plain text
2737 #: build/C/man2/mount.2:152
2738 msgid "Do not allow access to devices (special files) on this file system."
2739 msgstr ""
2740
2741 #. type: TP
2742 #: build/C/man2/mount.2:152
2743 #, no-wrap
2744 msgid "B<MS_NODIRATIME>"
2745 msgstr ""
2746
2747 #. type: Plain text
2748 #: build/C/man2/mount.2:161
2749 msgid ""
2750 "Do not update access times for directories on this file system.  This flag "
2751 "provides a subset of the functionality provided by B<MS_NOATIME>; that is, "
2752 "B<MS_NOATIME> implies B<MS_NODIRATIME>."
2753 msgstr ""
2754
2755 #. type: TP
2756 #: build/C/man2/mount.2:161
2757 #, no-wrap
2758 msgid "B<MS_NOEXEC>"
2759 msgstr ""
2760
2761 #.  (Possibly useful for a file system that contains non-Linux executables.
2762 #.  Often used as a security feature, e.g., to make sure that restricted
2763 #.  users cannot execute files uploaded using ftp or so.)
2764 #. type: Plain text
2765 #: build/C/man2/mount.2:167
2766 msgid "Do not allow programs to be executed from this file system."
2767 msgstr ""
2768
2769 #. type: TP
2770 #: build/C/man2/mount.2:167
2771 #, no-wrap
2772 msgid "B<MS_NOSUID>"
2773 msgstr ""
2774
2775 #.  (This is a security feature to prevent users executing set-user-ID and
2776 #.  set-group-ID programs from removable disk devices.)
2777 #. type: Plain text
2778 #: build/C/man2/mount.2:173
2779 msgid ""
2780 "Do not honor set-user-ID and set-group-ID bits when executing programs from "
2781 "this file system."
2782 msgstr ""
2783
2784 #. type: TP
2785 #: build/C/man2/mount.2:173
2786 #, no-wrap
2787 msgid "B<MS_RDONLY>"
2788 msgstr ""
2789
2790 #
2791 #.  FIXME Document MS_REC, available since 2.4.11.
2792 #.  This flag has meaning in conjunction with MS_BIND and
2793 #.  also with the shared subtree flags.
2794 #. type: Plain text
2795 #: build/C/man2/mount.2:180
2796 msgid "Mount file system read-only."
2797 msgstr ""
2798
2799 #. type: TP
2800 #: build/C/man2/mount.2:180
2801 #, no-wrap
2802 msgid "B<MS_RELATIME> (Since Linux 2.6.20)"
2803 msgstr ""
2804
2805 #.  Matthew Garrett notes in the patch that added this behavior
2806 #.  that this lets utilities such as tmpreaper (which deletes
2807 #.  files based on last acces time) work correctly.
2808 #. type: Plain text
2809 #: build/C/man2/mount.2:201
2810 msgid ""
2811 "When a file on this file system is accessed, only update the file's last "
2812 "access time (atime) if the current value of atime is less than or equal to "
2813 "the file's last modification time (mtime)  or last status change time "
2814 "(ctime).  This option is useful for programs, such as B<mutt>(1), that need "
2815 "to know when a file has been read since it was last modified.  Since Linux "
2816 "2.6.30, the kernel defaults to the behavior provided by this flag (unless "
2817 "B<MS_NOATIME> was specified), and the B<MS_STRICTATIME> flag is required to "
2818 "obtain traditional semantics.  In addition, since Linux 2.6.30, the file's "
2819 "last access time is always updated if it is more than 1 day old."
2820 msgstr ""
2821
2822 #. type: TP
2823 #: build/C/man2/mount.2:201
2824 #, no-wrap
2825 msgid "B<MS_REMOUNT>"
2826 msgstr ""
2827
2828 #. type: Plain text
2829 #: build/C/man2/mount.2:217
2830 msgid ""
2831 "Remount an existing mount.  This allows you to change the I<mountflags> and "
2832 "I<data> of an existing mount without having to unmount and remount the file "
2833 "system.  I<source> and I<target> should be the same values specified in the "
2834 "initial B<mount>()  call; I<filesystemtype> is ignored."
2835 msgstr ""
2836
2837 #. type: Plain text
2838 #: build/C/man2/mount.2:232
2839 msgid ""
2840 "The following I<mountflags> can be changed: B<MS_RDONLY>, B<MS_SYNCHRONOUS>, "
2841 "B<MS_MANDLOCK>; before kernel 2.6.16, the following could also be changed: "
2842 "B<MS_NOATIME> and B<MS_NODIRATIME>; and, additionally, before kernel 2.4.10, "
2843 "the following could also be changed: B<MS_NOSUID>, B<MS_NODEV>, "
2844 "B<MS_NOEXEC>."
2845 msgstr ""
2846
2847 #. type: TP
2848 #: build/C/man2/mount.2:232
2849 #, no-wrap
2850 msgid "B<MS_SILENT> (since Linux 2.6.17)"
2851 msgstr ""
2852
2853 #. type: Plain text
2854 #: build/C/man2/mount.2:240
2855 msgid ""
2856 "Suppress the display of certain (I<printk>())  warning messages in the "
2857 "kernel log.  This flag supersedes the misnamed and obsolete B<MS_VERBOSE> "
2858 "flag (available since Linux 2.4.12), which has the same meaning."
2859 msgstr ""
2860
2861 #. type: TP
2862 #: build/C/man2/mount.2:240
2863 #, no-wrap
2864 msgid "B<MS_STRICTATIME> (Since Linux 2.6.30)"
2865 msgstr ""
2866
2867 #. type: Plain text
2868 #: build/C/man2/mount.2:250
2869 msgid ""
2870 "Always update the last access time (atime) when files on this file system "
2871 "are accessed.  (This was the default behavior before Linux 2.6.30.)  "
2872 "Specifying this flag overrides the effect of setting the B<MS_NOATIME> and "
2873 "B<MS_RELATIME> flags."
2874 msgstr ""
2875
2876 #. type: TP
2877 #: build/C/man2/mount.2:250
2878 #, no-wrap
2879 msgid "B<MS_SYNCHRONOUS>"
2880 msgstr ""
2881
2882 #. type: Plain text
2883 #: build/C/man2/mount.2:258
2884 msgid ""
2885 "Make writes on this file system synchronous (as though the B<O_SYNC> flag to "
2886 "B<open>(2)  was specified for all file opens to this file system)."
2887 msgstr ""
2888
2889 #. type: Plain text
2890 #: build/C/man2/mount.2:270
2891 msgid ""
2892 "From Linux 2.4 onward, the B<MS_NODEV>, B<MS_NOEXEC>, and B<MS_NOSUID> flags "
2893 "are settable on a per-mount-point basis.  From kernel 2.6.16 onward, "
2894 "B<MS_NOATIME> and B<MS_NODIRATIME> are also settable on a per-mount-point "
2895 "basis.  The B<MS_RELATIME> flag is also settable on a per-mount-point basis."
2896 msgstr ""
2897
2898 #. type: Plain text
2899 #: build/C/man2/mount.2:279
2900 msgid ""
2901 "The I<data> argument is interpreted by the different file systems.  "
2902 "Typically it is a string of comma-separated options understood by this file "
2903 "system.  See B<mount>(8)  for details of the options available for each "
2904 "filesystem type."
2905 msgstr ""
2906
2907 #. type: Plain text
2908 #: build/C/man2/mount.2:284 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/umount.2:104
2909 msgid ""
2910 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
2911 "appropriately."
2912 msgstr ""
2913
2914 #. type: Plain text
2915 #: build/C/man2/mount.2:290
2916 msgid ""
2917 "The error values given below result from filesystem type independent "
2918 "errors.  Each file-system type may have its own special errors and its own "
2919 "special behavior.  See the kernel source code for details."
2920 msgstr ""
2921
2922 #. type: TP
2923 #: build/C/man2/mount.2:290 build/C/man2/spu_create.2:169 build/C/man2/stat.2:306 build/C/man2/statfs.2:133 build/C/man3/statvfs.3:100
2924 #, no-wrap
2925 msgid "B<EACCES>"
2926 msgstr ""
2927
2928 #.  mtk: Probably: write permission is required for MS_BIND, with
2929 #.  the error EPERM if not present; CAP_DAC_OVERRIDE is required.
2930 #. type: Plain text
2931 #: build/C/man2/mount.2:305
2932 msgid ""
2933 "A component of a path was not searchable.  (See also B<path_resolution>(7).)  "
2934 "Or, mounting a read-only file system was attempted without giving the "
2935 "B<MS_RDONLY> flag.  Or, the block device I<source> is located on a file "
2936 "system mounted with the B<MS_NODEV> option."
2937 msgstr ""
2938
2939 #. type: TP
2940 #: build/C/man2/mount.2:305 build/C/man2/umount.2:117
2941 #, no-wrap
2942 msgid "B<EBUSY>"
2943 msgstr ""
2944
2945 #. type: Plain text
2946 #: build/C/man2/mount.2:317
2947 msgid ""
2948 "I<source> is already mounted.  Or, it cannot be remounted read-only, because "
2949 "it still holds files open for writing.  Or, it cannot be mounted on "
2950 "I<target> because I<target> is still busy (it is the working directory of "
2951 "some thread, the mount point of another device, has open files, etc.)."
2952 msgstr ""
2953
2954 #. type: TP
2955 #: build/C/man2/mount.2:317 build/C/man2/spu_create.2:177 build/C/man2/spu_run.2:154 build/C/man2/stat.2:317 build/C/man2/statfs.2:145 build/C/man3/statvfs.3:112 build/C/man2/sysfs.2:78 build/C/man2/umount.2:121 build/C/man2/ustat.2:76
2956 #, no-wrap
2957 msgid "B<EFAULT>"
2958 msgstr ""
2959
2960 #. type: Plain text
2961 #: build/C/man2/mount.2:320
2962 msgid "One of the pointer arguments points outside the user address space."
2963 msgstr ""
2964
2965 #. type: Plain text
2966 #: build/C/man2/mount.2:335
2967 msgid ""
2968 "I<source> had an invalid superblock.  Or, a remount (B<MS_REMOUNT>)  was "
2969 "attempted, but I<source> was not already mounted on I<target>.  Or, a move "
2970 "(B<MS_MOVE>)  was attempted, but I<source> was not a mount point, or was "
2971 "\\(aq/\\(aq."
2972 msgstr ""
2973
2974 #. type: TP
2975 #: build/C/man2/mount.2:335 build/C/man2/spu_create.2:188 build/C/man2/stat.2:320 build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
2976 #, no-wrap
2977 msgid "B<ELOOP>"
2978 msgstr ""
2979
2980 #. type: Plain text
2981 #: build/C/man2/mount.2:342
2982 msgid ""
2983 "Too many links encountered during pathname resolution.  Or, a move was "
2984 "attempted, while I<target> is a descendant of I<source>."
2985 msgstr ""
2986
2987 #. type: TP
2988 #: build/C/man2/mount.2:342 build/C/man2/spu_create.2:192
2989 #, no-wrap
2990 msgid "B<EMFILE>"
2991 msgstr ""
2992
2993 #. type: Plain text
2994 #: build/C/man2/mount.2:346
2995 msgid "(In case no block device is required:)  Table of dummy devices is full."
2996 msgstr ""
2997
2998 #. type: TP
2999 #: build/C/man2/mount.2:346 build/C/man2/spu_create.2:195 build/C/man2/stat.2:323 build/C/man2/statfs.2:162 build/C/man3/statvfs.3:129 build/C/man2/umount.2:137
3000 #, no-wrap
3001 msgid "B<ENAMETOOLONG>"
3002 msgstr ""
3003
3004 #. type: Plain text
3005 #: build/C/man2/mount.2:350 build/C/man2/umount.2:141
3006 msgid "A pathname was longer than B<MAXPATHLEN>."
3007 msgstr ""
3008
3009 #. type: TP
3010 #: build/C/man2/mount.2:350 build/C/man2/spu_create.2:202
3011 #, no-wrap
3012 msgid "B<ENODEV>"
3013 msgstr ""
3014
3015 #. type: Plain text
3016 #: build/C/man2/mount.2:354
3017 msgid "I<filesystemtype> not configured in the kernel."
3018 msgstr ""
3019
3020 #. type: TP
3021 #: build/C/man2/mount.2:354 build/C/man2/spu_create.2:206 build/C/man2/stat.2:327 build/C/man2/statfs.2:167 build/C/man3/statvfs.3:134 build/C/man2/umount.2:141
3022 #, no-wrap
3023 msgid "B<ENOENT>"
3024 msgstr ""
3025
3026 #. type: Plain text
3027 #: build/C/man2/mount.2:357 build/C/man2/umount.2:144
3028 msgid "A pathname was empty or had a nonexistent component."
3029 msgstr ""
3030
3031 #. type: TP
3032 #: build/C/man2/mount.2:357 build/C/man2/spu_create.2:211 build/C/man2/spu_run.2:175 build/C/man2/stat.2:334 build/C/man2/statfs.2:173 build/C/man3/statvfs.3:140 build/C/man2/umount.2:144
3033 #, no-wrap
3034 msgid "B<ENOMEM>"
3035 msgstr ""
3036
3037 #. type: Plain text
3038 #: build/C/man2/mount.2:360 build/C/man2/umount.2:147
3039 msgid "The kernel could not allocate a free page to copy filenames or data into."
3040 msgstr ""
3041
3042 #. type: TP
3043 #: build/C/man2/mount.2:360
3044 #, no-wrap
3045 msgid "B<ENOTBLK>"
3046 msgstr ""
3047
3048 #. type: Plain text
3049 #: build/C/man2/mount.2:364
3050 msgid "I<source> is not a block device (and a device was required)."
3051 msgstr ""
3052
3053 #. type: TP
3054 #: build/C/man2/mount.2:364 build/C/man2/spu_create.2:224 build/C/man2/stat.2:337 build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
3055 #, no-wrap
3056 msgid "B<ENOTDIR>"
3057 msgstr ""
3058
3059 #. type: Plain text
3060 #: build/C/man2/mount.2:370
3061 msgid "I<target>, or a prefix of I<source>, is not a directory."
3062 msgstr ""
3063
3064 #. type: TP
3065 #: build/C/man2/mount.2:370
3066 #, no-wrap
3067 msgid "B<ENXIO>"
3068 msgstr ""
3069
3070 #. type: Plain text
3071 #: build/C/man2/mount.2:375
3072 msgid "The major number of the block device I<source> is out of range."
3073 msgstr ""
3074
3075 #. type: TP
3076 #: build/C/man2/mount.2:375 build/C/man2/spu_create.2:229 build/C/man2/umount.2:147
3077 #, no-wrap
3078 msgid "B<EPERM>"
3079 msgstr ""
3080
3081 #. type: Plain text
3082 #: build/C/man2/mount.2:378 build/C/man2/umount.2:150
3083 msgid "The caller does not have the required privileges."
3084 msgstr ""
3085
3086 #.  FIXME: Definitions of the so-far-undocumented MS_UNBINDABLE, MS_PRIVATE,
3087 #.   MS_SHARED, and MS_SLAVE were (also) only added to glibc headers in 2.12.
3088 #. type: Plain text
3089 #: build/C/man2/mount.2:389
3090 msgid ""
3091 "The definitions of B<MS_DIRSYNC>, B<MS_MOVE>, B<MS_REC>, B<MS_RELATIME>, and "
3092 "B<MS_STRICTATIME> were only added to glibc headers in version 2.12."
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man2/mount.2:392
3097 msgid ""
3098 "This function is Linux-specific and should not be used in programs intended "
3099 "to be portable."
3100 msgstr ""
3101
3102 #. type: Plain text
3103 #: build/C/man2/mount.2:401
3104 msgid ""
3105 "The original B<MS_SYNC> flag was renamed B<MS_SYNCHRONOUS> in 1.1.69 when a "
3106 "different B<MS_SYNC> was added to I<E<lt>mman.hE<gt>>."
3107 msgstr ""
3108
3109 #.  The change is in patch-2.4.0-prerelease.
3110 #. type: Plain text
3111 #: build/C/man2/mount.2:410
3112 msgid ""
3113 "Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program "
3114 "on a file system mounted with B<MS_NOSUID> would fail with B<EPERM>.  Since "
3115 "Linux 2.4 the set-user-ID and set-group-ID bits are just silently ignored in "
3116 "this case."
3117 msgstr ""
3118
3119 #. type: SS
3120 #: build/C/man2/mount.2:410
3121 #, no-wrap
3122 msgid "Per-process Namespaces"
3123 msgstr ""
3124
3125 #. type: Plain text
3126 #: build/C/man2/mount.2:421
3127 msgid ""
3128 "Starting with kernel 2.4.19, Linux provides per-process mount namespaces.  A "
3129 "mount namespace is the set of file system mounts that are visible to a "
3130 "process.  Mount-point namespaces can be (and usually are)  shared between "
3131 "multiple processes, and changes to the namespace (i.e., mounts and unmounts) "
3132 "by one process are visible to all other processes sharing the same "
3133 "namespace.  (The pre-2.4.19 Linux situation can be considered as one in "
3134 "which a single namespace was shared by every process on the system.)"
3135 msgstr ""
3136
3137 #. type: Plain text
3138 #: build/C/man2/mount.2:427
3139 msgid ""
3140 "A child process created by B<fork>(2)  shares its parent's mount namespace; "
3141 "the mount namespace is preserved across an B<execve>(2)."
3142 msgstr ""
3143
3144 #. type: Plain text
3145 #: build/C/man2/mount.2:447
3146 msgid ""
3147 "A process can obtain a private mount namespace if: it was created using the "
3148 "B<clone>(2)  B<CLONE_NEWNS> flag, in which case its new namespace is "
3149 "initialized to be a I<copy> of the namespace of the process that called "
3150 "B<clone>(2); or it calls B<unshare>(2)  with the B<CLONE_NEWNS> flag, which "
3151 "causes the caller's mount namespace to obtain a private copy of the "
3152 "namespace that it was previously sharing with other processes, so that "
3153 "future mounts and unmounts by the caller are invisible to other processes "
3154 "(except child processes that the caller subsequently creates) and vice "
3155 "versa."
3156 msgstr ""
3157
3158 #. type: Plain text
3159 #: build/C/man2/mount.2:454
3160 msgid ""
3161 "The Linux-specific I</proc/PID/mounts> file exposes the list of mount points "
3162 "in the mount namespace of the process with the specified ID; see B<proc>(5)  "
3163 "for details."
3164 msgstr ""
3165
3166 #. type: Plain text
3167 #: build/C/man2/mount.2:459
3168 msgid "B<umount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
3169 msgstr ""
3170
3171 #. type: TH
3172 #: build/C/man7/path_resolution.7:23
3173 #, no-wrap
3174 msgid "PATH_RESOLUTION"
3175 msgstr ""
3176
3177 #. type: TH
3178 #: build/C/man7/path_resolution.7:23
3179 #, no-wrap
3180 msgid "2009-12-05"
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man7/path_resolution.7:26
3185 msgid "path_resolution - how a pathname is resolved to a file"
3186 msgstr ""
3187
3188 #. type: Plain text
3189 #: build/C/man7/path_resolution.7:29
3190 msgid ""
3191 "Some UNIX/Linux system calls have as parameter one or more filenames.  A "
3192 "filename (or pathname) is resolved as follows."
3193 msgstr ""
3194
3195 #. type: SS
3196 #: build/C/man7/path_resolution.7:29
3197 #, no-wrap
3198 msgid "Step 1: Start of the resolution process"
3199 msgstr ""
3200
3201 #. type: Plain text
3202 #: build/C/man7/path_resolution.7:48
3203 msgid ""
3204 "If the pathname starts with the \\(aq/\\(aq character, the starting lookup "
3205 "directory is the root directory of the calling process.  (A process inherits "
3206 "its root directory from its parent.  Usually this will be the root directory "
3207 "of the file hierarchy.  A process may get a different root directory by use "
3208 "of the B<chroot>(2)  system call.  A process may get an entirely private "
3209 "mount namespace in case it\\(emor one of its ancestors\\(emwas started by an "
3210 "invocation of the B<clone>(2)  system call that had the B<CLONE_NEWNS> flag "
3211 "set.)  This handles the \\(aq/\\(aq part of the pathname."
3212 msgstr ""
3213
3214 #. type: Plain text
3215 #: build/C/man7/path_resolution.7:56
3216 msgid ""
3217 "If the pathname does not start with the \\(aq/\\(aq character, the starting "
3218 "lookup directory of the resolution process is the current working directory "
3219 "of the process.  (This is also inherited from the parent.  It can be changed "
3220 "by use of the B<chdir>(2)  system call.)"
3221 msgstr ""
3222
3223 #. type: Plain text
3224 #: build/C/man7/path_resolution.7:59
3225 msgid ""
3226 "Pathnames starting with a \\(aq/\\(aq character are called absolute "
3227 "pathnames.  Pathnames not starting with a \\(aq/\\(aq are called relative "
3228 "pathnames."
3229 msgstr ""
3230
3231 #. type: SS
3232 #: build/C/man7/path_resolution.7:59
3233 #, no-wrap
3234 msgid "Step 2: Walk along the path"
3235 msgstr ""
3236
3237 #. type: Plain text
3238 #: build/C/man7/path_resolution.7:64
3239 msgid ""
3240 "Set the current lookup directory to the starting lookup directory.  Now, for "
3241 "each nonfinal component of the pathname, where a component is a substring "
3242 "delimited by \\(aq/\\(aq characters, this component is looked up in the "
3243 "current lookup directory."
3244 msgstr ""
3245
3246 #. type: Plain text
3247 #: build/C/man7/path_resolution.7:70
3248 msgid ""
3249 "If the process does not have search permission on the current lookup "
3250 "directory, an B<EACCES> error is returned (\"Permission denied\")."
3251 msgstr ""
3252
3253 #. type: Plain text
3254 #: build/C/man7/path_resolution.7:75
3255 msgid ""
3256 "If the component is not found, an B<ENOENT> error is returned (\"No such "
3257 "file or directory\")."
3258 msgstr ""
3259
3260 #. type: Plain text
3261 #: build/C/man7/path_resolution.7:80
3262 msgid ""
3263 "If the component is found, but is neither a directory nor a symbolic link, "
3264 "an B<ENOTDIR> error is returned (\"Not a directory\")."
3265 msgstr ""
3266
3267 #. type: Plain text
3268 #: build/C/man7/path_resolution.7:84
3269 msgid ""
3270 "If the component is found and is a directory, we set the current lookup "
3271 "directory to that directory, and go to the next component."
3272 msgstr ""
3273
3274 #
3275 #.  presently: max recursion depth during symlink resolution: 5
3276 #.  max total number of symbolic links followed: 40
3277 #.  _POSIX_SYMLOOP_MAX is 8
3278 #. type: Plain text
3279 #: build/C/man7/path_resolution.7:108
3280 msgid ""
3281 "If the component is found and is a symbolic link (symlink), we first resolve "
3282 "this symbolic link (with the current lookup directory as starting lookup "
3283 "directory).  Upon error, that error is returned.  If the result is not a "
3284 "directory, an B<ENOTDIR> error is returned.  If the resolution of the "
3285 "symlink is successful and returns a directory, we set the current lookup "
3286 "directory to that directory, and go to the next component.  Note that the "
3287 "resolution process here involves recursion.  In order to protect the kernel "
3288 "against stack overflow, and also to protect against denial of service, there "
3289 "are limits on the maximum recursion depth, and on the maximum number of "
3290 "symbolic links followed.  An B<ELOOP> error is returned when the maximum is "
3291 "exceeded (\"Too many levels of symbolic links\")."
3292 msgstr ""
3293
3294 #. type: SS
3295 #: build/C/man7/path_resolution.7:108
3296 #, no-wrap
3297 msgid "Step 3: Find the final entry"
3298 msgstr ""
3299
3300 #. type: Plain text
3301 #: build/C/man7/path_resolution.7:120
3302 msgid ""
3303 "The lookup of the final component of the pathname goes just like that of all "
3304 "other components, as described in the previous step, with two differences: "
3305 "(i) the final component need not be a directory (at least as far as the path "
3306 "resolution process is concerned\\(emit may have to be a directory, or a "
3307 "nondirectory, because of the requirements of the specific system call), and "
3308 "(ii) it is not necessarily an error if the component is not found\\(emmaybe "
3309 "we are just creating it.  The details on the treatment of the final entry "
3310 "are described in the manual pages of the specific system calls."
3311 msgstr ""
3312
3313 #. type: SS
3314 #: build/C/man7/path_resolution.7:120
3315 #, no-wrap
3316 msgid ". and .."
3317 msgstr ""
3318
3319 #. type: Plain text
3320 #: build/C/man7/path_resolution.7:124
3321 msgid ""
3322 "By convention, every directory has the entries \".\" and \"..\", which refer "
3323 "to the directory itself and to its parent directory, respectively."
3324 msgstr ""
3325
3326 #. type: Plain text
3327 #: build/C/man7/path_resolution.7:128
3328 msgid ""
3329 "The path resolution process will assume that these entries have their "
3330 "conventional meanings, regardless of whether they are actually present in "
3331 "the physical file system."
3332 msgstr ""
3333
3334 #. type: Plain text
3335 #: build/C/man7/path_resolution.7:130
3336 msgid "One cannot walk down past the root: \"/..\" is the same as \"/\"."
3337 msgstr ""
3338
3339 #. type: SS
3340 #: build/C/man7/path_resolution.7:130
3341 #, no-wrap
3342 msgid "Mount points"
3343 msgstr ""
3344
3345 #. type: Plain text
3346 #: build/C/man7/path_resolution.7:134
3347 msgid ""
3348 "After a \"mount dev path\" command, the pathname \"path\" refers to the root "
3349 "of the file system hierarchy on the device \"dev\", and no longer to "
3350 "whatever it referred to earlier."
3351 msgstr ""
3352
3353 #. type: Plain text
3354 #: build/C/man7/path_resolution.7:138
3355 msgid ""
3356 "One can walk out of a mounted file system: \"path/..\" refers to the parent "
3357 "directory of \"path\", outside of the file system hierarchy on \"dev\"."
3358 msgstr ""
3359
3360 #. type: SS
3361 #: build/C/man7/path_resolution.7:138
3362 #, no-wrap
3363 msgid "Trailing slashes"
3364 msgstr ""
3365
3366 #. type: Plain text
3367 #: build/C/man7/path_resolution.7:144
3368 msgid ""
3369 "If a pathname ends in a \\(aq/\\(aq, that forces resolution of the preceding "
3370 "component as in Step 2: it has to exist and resolve to a directory.  "
3371 "Otherwise a trailing \\(aq/\\(aq is ignored.  (Or, equivalently, a pathname "
3372 "with a trailing \\(aq/\\(aq is equivalent to the pathname obtained by "
3373 "appending \\(aq.\\(aq to it.)"
3374 msgstr ""
3375
3376 #. type: SS
3377 #: build/C/man7/path_resolution.7:144
3378 #, no-wrap
3379 msgid "Final symlink"
3380 msgstr ""
3381
3382 #. type: Plain text
3383 #: build/C/man7/path_resolution.7:153
3384 msgid ""
3385 "If the last component of a pathname is a symbolic link, then it depends on "
3386 "the system call whether the file referred to will be the symbolic link or "
3387 "the result of path resolution on its contents.  For example, the system call "
3388 "B<lstat>(2)  will operate on the symlink, while B<stat>(2)  operates on the "
3389 "file pointed to by the symlink."
3390 msgstr ""
3391
3392 #. type: SS
3393 #: build/C/man7/path_resolution.7:153
3394 #, no-wrap
3395 msgid "Length limit"
3396 msgstr ""
3397
3398 #. type: Plain text
3399 #: build/C/man7/path_resolution.7:160
3400 msgid ""
3401 "There is a maximum length for pathnames.  If the pathname (or some "
3402 "intermediate pathname obtained while resolving symbolic links)  is too long, "
3403 "an B<ENAMETOOLONG> error is returned (\"Filename too long\")."
3404 msgstr ""
3405
3406 #. type: SS
3407 #: build/C/man7/path_resolution.7:160
3408 #, no-wrap
3409 msgid "Empty pathname"
3410 msgstr ""
3411
3412 #. type: Plain text
3413 #: build/C/man7/path_resolution.7:167
3414 msgid ""
3415 "In the original UNIX, the empty pathname referred to the current directory.  "
3416 "Nowadays POSIX decrees that an empty pathname must not be resolved "
3417 "successfully.  Linux returns B<ENOENT> in this case."
3418 msgstr ""
3419
3420 #. type: SS
3421 #: build/C/man7/path_resolution.7:167
3422 #, no-wrap
3423 msgid "Permissions"
3424 msgstr ""
3425
3426 #. type: Plain text
3427 #: build/C/man7/path_resolution.7:180
3428 msgid ""
3429 "The permission bits of a file consist of three groups of three bits, cf.\\& "
3430 "B<chmod>(1)  and B<stat>(2).  The first group of three is used when the "
3431 "effective user ID of the calling process equals the owner ID of the file.  "
3432 "The second group of three is used when the group ID of the file either "
3433 "equals the effective group ID of the calling process, or is one of the "
3434 "supplementary group IDs of the calling process (as set by B<setgroups>(2)).  "
3435 "When neither holds, the third group is used."
3436 msgstr ""
3437
3438 #. type: Plain text
3439 #: build/C/man7/path_resolution.7:184
3440 msgid ""
3441 "Of the three bits used, the first bit determines read permission, the second "
3442 "write permission, and the last execute permission in case of ordinary files, "
3443 "or search permission in case of directories."
3444 msgstr ""
3445
3446 #. type: Plain text
3447 #: build/C/man7/path_resolution.7:189
3448 msgid ""
3449 "Linux uses the fsuid instead of the effective user ID in permission checks.  "
3450 "Ordinarily the fsuid will equal the effective user ID, but the fsuid can be "
3451 "changed by the system call B<setfsuid>(2)."
3452 msgstr ""
3453
3454 #. type: Plain text
3455 #: build/C/man7/path_resolution.7:197
3456 msgid ""
3457 "(Here \"fsuid\" stands for something like \"file system user ID\".  The "
3458 "concept was required for the implementation of a user space NFS server at a "
3459 "time when processes could send a signal to a process with the same effective "
3460 "user ID.  It is obsolete now.  Nobody should use B<setfsuid>(2).)"
3461 msgstr ""
3462
3463 #.  FIXME say something about file system mounted read-only ?
3464 #. type: Plain text
3465 #: build/C/man7/path_resolution.7:203
3466 msgid ""
3467 "Similarly, Linux uses the fsgid (\"file system group ID\")  instead of the "
3468 "effective group ID.  See B<setfsgid>(2)."
3469 msgstr ""
3470
3471 #. type: SS
3472 #: build/C/man7/path_resolution.7:203
3473 #, no-wrap
3474 msgid "Bypassing permission checks: superuser and capabilities"
3475 msgstr ""
3476
3477 #.  (but for exec at least one x bit must be set) -- AEB
3478 #.  but there is variation across systems on this point: for
3479 #.  example, HP-UX and Tru64 are as described by AEB.  However,
3480 #.  on some implementations (e.g., Solaris, FreeBSD),
3481 #.  access(X_OK) by superuser will report success, regardless
3482 #.  of the file's execute permission bits. -- MTK (Oct 05)
3483 #. type: Plain text
3484 #: build/C/man7/path_resolution.7:214
3485 msgid ""
3486 "On a traditional UNIX system, the superuser (I<root>, user ID 0) is "
3487 "all-powerful, and bypasses all permissions restrictions when accessing "
3488 "files."
3489 msgstr ""
3490
3491 #. type: Plain text
3492 #: build/C/man7/path_resolution.7:220
3493 msgid ""
3494 "On Linux, superuser privileges are divided into capabilities (see "
3495 "B<capabilities>(7)).  Two capabilities are relevant for file permissions "
3496 "checks: B<CAP_DAC_OVERRIDE> and B<CAP_DAC_READ_SEARCH>.  (A process has "
3497 "these capabilities if its fsuid is 0.)"
3498 msgstr ""
3499
3500 #. type: Plain text
3501 #: build/C/man7/path_resolution.7:224
3502 msgid ""
3503 "The B<CAP_DAC_OVERRIDE> capability overrides all permission checking, but "
3504 "only grants execute permission when at least one of the file's three execute "
3505 "permission bits is set."
3506 msgstr ""
3507
3508 #.  FIXME say something about immutable files
3509 #.  FIXME say something about ACLs
3510 #. type: Plain text
3511 #: build/C/man7/path_resolution.7:229
3512 msgid ""
3513 "The B<CAP_DAC_READ_SEARCH> capability grants read and search permission on "
3514 "directories, and read permission on ordinary files."
3515 msgstr ""
3516
3517 #. type: Plain text
3518 #: build/C/man7/path_resolution.7:234
3519 msgid "B<readlink>(2), B<capabilities>(7), B<credentials>(7), B<symlink>(7)"
3520 msgstr ""
3521
3522 #. type: TH
3523 #: build/C/man2/removexattr.2:27
3524 #, no-wrap
3525 msgid "REMOVEXATTR"
3526 msgstr ""
3527
3528 #. type: Plain text
3529 #: build/C/man2/removexattr.2:30
3530 msgid "removexattr, lremovexattr, fremovexattr - remove an extended attribute"
3531 msgstr ""
3532
3533 #. type: Plain text
3534 #: build/C/man2/removexattr.2:39
3535 #, no-wrap
3536 msgid ""
3537 "B<int removexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3538 "B<int lremovexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3539 "B<int fremovexattr(int >I<fd>B<, const char\\ *>I<name>B<);>\n"
3540 msgstr ""
3541
3542 #. type: Plain text
3543 #: build/C/man2/removexattr.2:51
3544 msgid ""
3545 "Extended attributes are I<name>:value pairs associated with inodes (files, "
3546 "directories, symbolic links, etc.).  They are extensions to the normal "
3547 "attributes which are associated with all inodes in the system (i.e., the "
3548 "B<stat>(2)  data).  A complete overview of extended attributes concepts can "
3549 "be found in B<attr>(5)."
3550 msgstr ""
3551
3552 #. type: Plain text
3553 #: build/C/man2/removexattr.2:58
3554 msgid ""
3555 "B<removexattr>()  removes the extended attribute identified by I<name> and "
3556 "associated with the given I<path> in the file system."
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man2/removexattr.2:64
3561 msgid ""
3562 "B<lremovexattr>()  is identical to B<removexattr>(), except in the case of a "
3563 "symbolic link, where the extended attribute is removed from the link itself, "
3564 "not the file that it refers to."
3565 msgstr ""
3566
3567 #. type: Plain text
3568 #: build/C/man2/removexattr.2:74
3569 msgid ""
3570 "B<fremovexattr>()  is identical to B<removexattr>(), only the extended "
3571 "attribute is removed from the open file referred to by I<fd> (as returned by "
3572 "B<open>(2))  in place of I<path>."
3573 msgstr ""
3574
3575 #. type: Plain text
3576 #: build/C/man2/removexattr.2:80
3577 msgid ""
3578 "An extended attribute name is a simple null-terminated string.  The I<name> "
3579 "includes a namespace prefix; there may be several, disjoint namespaces "
3580 "associated with an individual inode."
3581 msgstr ""
3582
3583 #. type: Plain text
3584 #: build/C/man2/removexattr.2:85 build/C/man2/setxattr.2:112
3585 msgid ""
3586 "On success, zero is returned.  On failure, -1 is returned and I<errno> is "
3587 "set appropriately."
3588 msgstr ""
3589
3590 #. type: Plain text
3591 #: build/C/man2/removexattr.2:90
3592 msgid "If the named attribute does not exist, I<errno> is set to B<ENOATTR>."
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man2/removexattr.2:120
3597 msgid ""
3598 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3599 "B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3600 msgstr ""
3601
3602 #. type: TH
3603 #: build/C/man2/setxattr.2:27
3604 #, no-wrap
3605 msgid "SETXATTR"
3606 msgstr ""
3607
3608 #. type: TH
3609 #: build/C/man2/setxattr.2:27
3610 #, no-wrap
3611 msgid "2001-12-31"
3612 msgstr ""
3613
3614 #. type: Plain text
3615 #: build/C/man2/setxattr.2:30
3616 msgid "setxattr, lsetxattr, fsetxattr - set an extended attribute value"
3617 msgstr ""
3618
3619 #. type: Plain text
3620 #: build/C/man2/setxattr.2:42
3621 #, no-wrap
3622 msgid ""
3623 "B<int setxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3624 "B<              const void\\ *>I<value>B<, size_t >I<size>B<, int "
3625 ">I<flags>B<);>\n"
3626 "B<int lsetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3627 "B<              const void\\ *>I<value>B<, size_t >I<size>B<, int "
3628 ">I<flags>B<);>\n"
3629 "B<int fsetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
3630 "B<              const void\\ *>I<value>B<, size_t >I<size>B<, int "
3631 ">I<flags>B<);>\n"
3632 msgstr ""
3633
3634 #. type: Plain text
3635 #: build/C/man2/setxattr.2:69
3636 msgid ""
3637 "B<setxattr>()  sets the I<value> of the extended attribute identified by "
3638 "I<name> and associated with the given I<path> in the file system.  The "
3639 "I<size> of the I<value> must be specified."
3640 msgstr ""
3641
3642 #. type: Plain text
3643 #: build/C/man2/setxattr.2:75
3644 msgid ""
3645 "B<lsetxattr>()  is identical to B<setxattr>(), except in the case of a "
3646 "symbolic link, where the extended attribute is set on the link itself, not "
3647 "the file that it refers to."
3648 msgstr ""
3649
3650 #. type: Plain text
3651 #: build/C/man2/setxattr.2:85
3652 msgid ""
3653 "B<fsetxattr>()  is identical to B<setxattr>(), only the extended attribute "
3654 "is set on the open file referred to by I<fd> (as returned by B<open>(2))  in "
3655 "place of I<path>."
3656 msgstr ""
3657
3658 #. type: Plain text
3659 #: build/C/man2/setxattr.2:95
3660 msgid ""
3661 "An extended attribute name is a simple null-terminated string.  The I<name> "
3662 "includes a namespace prefix; there may be several, disjoint namespaces "
3663 "associated with an individual inode.  The I<value> of an extended attribute "
3664 "is a chunk of arbitrary textual or binary data of specified length."
3665 msgstr ""
3666
3667 #. type: Plain text
3668 #: build/C/man2/setxattr.2:107
3669 msgid ""
3670 "The I<flags> argument can be used to refine the semantics of the operation.  "
3671 "B<XATTR_CREATE> specifies a pure create, which fails if the named attribute "
3672 "exists already.  B<XATTR_REPLACE> specifies a pure replace operation, which "
3673 "fails if the named attribute does not already exist.  By default (no flags), "
3674 "the extended attribute will be created if need be, or will simply replace "
3675 "the value if the attribute exists."
3676 msgstr ""
3677
3678 #. type: Plain text
3679 #: build/C/man2/setxattr.2:125
3680 msgid ""
3681 "If B<XATTR_CREATE> is specified, and the attribute exists already, I<errno> "
3682 "is set to B<EEXIST>.  If B<XATTR_REPLACE> is specified, and the attribute "
3683 "does not exist, I<errno> is set to B<ENOATTR>."
3684 msgstr ""
3685
3686 #. type: Plain text
3687 #: build/C/man2/setxattr.2:133
3688 msgid ""
3689 "If there is insufficient space remaining to store the extended attribute, "
3690 "I<errno> is set to either B<ENOSPC>, or B<EDQUOT> if quota enforcement was "
3691 "the cause."
3692 msgstr ""
3693
3694 #. type: Plain text
3695 #: build/C/man2/setxattr.2:163
3696 msgid ""
3697 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3698 "B<removexattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3699 msgstr ""
3700
3701 #. type: TH
3702 #: build/C/man2/spu_create.2:24
3703 #, no-wrap
3704 msgid "SPU_CREATE"
3705 msgstr ""
3706
3707 #. type: TH
3708 #: build/C/man2/spu_create.2:24 build/C/man7/spufs.7:26
3709 #, no-wrap
3710 msgid "2007-12-20"
3711 msgstr ""
3712
3713 #. type: Plain text
3714 #: build/C/man2/spu_create.2:27
3715 msgid "spu_create - create a new spu context"
3716 msgstr ""
3717
3718 #. type: Plain text
3719 #: build/C/man2/spu_create.2:31
3720 #, no-wrap
3721 msgid ""
3722 "B<#include E<lt>sys/types.hE<gt>>\n"
3723 "B<#include E<lt>sys/spu.hE<gt>>\n"
3724 msgstr ""
3725
3726 #. type: Plain text
3727 #: build/C/man2/spu_create.2:35
3728 #, no-wrap
3729 msgid ""
3730 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3731 ">I<mode>B<);>\n"
3732 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3733 ">I<mode>B<,>\n"
3734 "B<               int >I<neighbor_fd>B<);>\n"
3735 msgstr ""
3736
3737 #. type: Plain text
3738 #: build/C/man2/spu_create.2:55
3739 msgid ""
3740 "The B<spu_create>()  system call is used on PowerPC machines that implement "
3741 "the Cell Broadband Engine Architecture in order to access Synergistic "
3742 "Processor Units (SPUs).  It creates a new logical context for an SPU in "
3743 "I<pathname> and returns a file descriptor associated with it.  I<pathname> "
3744 "must refer to a nonexistent directory in the mount point of the SPU file "
3745 "system (B<spufs>).  If B<spu_create>()  is successful, a directory is "
3746 "created at I<pathname> and it is populated with the files described in "
3747 "B<spufs>(7)."
3748 msgstr ""
3749
3750 #. type: Plain text
3751 #: build/C/man2/spu_create.2:74
3752 msgid ""
3753 "When a context is created, the returned file descriptor can only be passed "
3754 "to B<spu_run>(2), used as the I<dirfd> argument to the B<*at> family of "
3755 "system calls (e.g., B<openat>(2)), or closed; other operations are not "
3756 "defined.  A logical SPU context is destroyed (along with all files created "
3757 "within the context's I<pathname> directory) once the last reference to the "
3758 "context has gone; this usually occurs when the file descriptor returned by "
3759 "B<spu_create>()  is closed."
3760 msgstr ""
3761
3762 #. type: Plain text
3763 #: build/C/man2/spu_create.2:79
3764 msgid ""
3765 "The I<flags> argument can be zero or any bitwise OR-ed combination of the "
3766 "following constants:"
3767 msgstr ""
3768
3769 #. type: TP
3770 #: build/C/man2/spu_create.2:79
3771 #, no-wrap
3772 msgid "B<SPU_CREATE_EVENTS_ENABLED>"
3773 msgstr ""
3774
3775 #. type: Plain text
3776 #: build/C/man2/spu_create.2:85
3777 msgid ""
3778 "Rather than using signals for reporting DMA errors, use the I<event> "
3779 "argument to B<spu_run>(2)."
3780 msgstr ""
3781
3782 #. type: TP
3783 #: build/C/man2/spu_create.2:85
3784 #, no-wrap
3785 msgid "B<SPU_CREATE_GANG>"
3786 msgstr ""
3787
3788 #. type: Plain text
3789 #: build/C/man2/spu_create.2:93
3790 msgid ""
3791 "Create an SPU gang instead of a context.  (A gang is a group of SPU contexts "
3792 "that are functionally related to each other and which share common "
3793 "scheduling parameters\\(empriority and policy.  In the future, gang "
3794 "scheduling may be implemented causing the group to be switched in and out as "
3795 "a single unit.)"
3796 msgstr ""
3797
3798 #. type: Plain text
3799 #: build/C/man2/spu_create.2:100
3800 msgid ""
3801 "A new directory will be created at the location specified by the I<pathname> "
3802 "argument.  This gang may be used to hold other SPU contexts, by providing a "
3803 "pathname that is within the gang directory to further calls to "
3804 "B<spu_create>()."
3805 msgstr ""
3806
3807 #. type: TP
3808 #: build/C/man2/spu_create.2:100
3809 #, no-wrap
3810 msgid "B<SPU_CREATE_NOSCHED>"
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man2/spu_create.2:106
3815 msgid ""
3816 "Create a context that is not affected by the SPU scheduler.  Once the "
3817 "context is run, it will not be scheduled out until it is destroyed by the "
3818 "creating process."
3819 msgstr ""
3820
3821 #. type: Plain text
3822 #: build/C/man2/spu_create.2:117
3823 msgid ""
3824 "Because the context cannot be removed from the SPU, some functionality is "
3825 "disabled for B<SPU_CREATE_NOSCHED> contexts.  Only a subset of the files "
3826 "will be available in this context directory in B<spufs>.  Additionally, "
3827 "B<SPU_CREATE_NOSCHED> contexts cannot dump a core file when crashing."
3828 msgstr ""
3829
3830 #. type: Plain text
3831 #: build/C/man2/spu_create.2:123
3832 msgid ""
3833 "Creating B<SPU_CREATE_NOSCHED> contexts requires the B<CAP_SYS_NICE> "
3834 "capability."
3835 msgstr ""
3836
3837 #. type: TP
3838 #: build/C/man2/spu_create.2:123
3839 #, no-wrap
3840 msgid "B<SPU_CREATE_ISOLATE>"
3841 msgstr ""
3842
3843 #. type: Plain text
3844 #: build/C/man2/spu_create.2:130
3845 msgid ""
3846 "Create an isolated SPU context.  Isolated contexts are protected from some "
3847 "PPE (PowerPC Processing Element)  operations, such as access to the SPU "
3848 "local store and the NPC register."
3849 msgstr ""
3850
3851 #. type: Plain text
3852 #: build/C/man2/spu_create.2:136
3853 msgid ""
3854 "Creating B<SPU_CREATE_ISOLATE> contexts also requires the "
3855 "B<SPU_CREATE_NOSCHED> flag."
3856 msgstr ""
3857
3858 #. type: TP
3859 #: build/C/man2/spu_create.2:136
3860 #, no-wrap
3861 msgid "B<SPU_CREATE_AFFINITY_SPU>"
3862 msgstr ""
3863
3864 #. type: Plain text
3865 #: build/C/man2/spu_create.2:144
3866 msgid ""
3867 "Create a context with affinity to another SPU context.  This affinity "
3868 "information is used within the SPU scheduling algorithm.  Using this flag "
3869 "requires that a file descriptor referring to the other SPU context be passed "
3870 "in the I<neighbor_fd> argument."
3871 msgstr ""
3872
3873 #. type: TP
3874 #: build/C/man2/spu_create.2:144
3875 #, no-wrap
3876 msgid "B<SPU_CREATE_AFFINITY_MEM>"
3877 msgstr ""
3878
3879 #. type: Plain text
3880 #: build/C/man2/spu_create.2:149
3881 msgid ""
3882 "Create a context with affinity to system memory.  This affinity information "
3883 "is used within the SPU scheduling algorithm."
3884 msgstr ""
3885
3886 #. type: Plain text
3887 #: build/C/man2/spu_create.2:161
3888 msgid ""
3889 "The I<mode> argument (minus any bits set in the process's B<umask>(2))  "
3890 "specifies the permissions used for creating the new directory in B<spufs>.  "
3891 "See B<stat>(2)  for a full list of the possible I<mode> values."
3892 msgstr ""
3893
3894 #. type: Plain text
3895 #: build/C/man2/spu_create.2:168
3896 msgid ""
3897 "On success, B<spu_create>()  returns a new file descriptor.  On error, -1 is "
3898 "returned, and I<errno> is set to one of the error codes listed below."
3899 msgstr ""
3900
3901 #. type: Plain text
3902 #: build/C/man2/spu_create.2:174
3903 msgid "The current user does not have write access to the B<spufs>(7)  mount point."
3904 msgstr ""
3905
3906 #. type: TP
3907 #: build/C/man2/spu_create.2:174
3908 #, no-wrap
3909 msgid "B<EEXIST>"
3910 msgstr ""
3911
3912 #. type: Plain text
3913 #: build/C/man2/spu_create.2:177
3914 msgid "An SPU context already exists at the given path name."
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: build/C/man2/spu_create.2:182
3919 msgid ""
3920 "I<pathname> is not a valid string pointer in the calling process's address "
3921 "space."
3922 msgstr ""
3923
3924 #. type: Plain text
3925 #: build/C/man2/spu_create.2:188
3926 msgid ""
3927 "I<pathname> is not a directory in the B<spufs>(7)  mount point, or invalid "
3928 "flags have been provided."
3929 msgstr ""
3930
3931 #. type: Plain text
3932 #: build/C/man2/spu_create.2:192
3933 msgid "Too many symbolic links were found while resolving I<pathname>."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man2/spu_create.2:195
3938 msgid "The process has reached its maximum open files limit."
3939 msgstr ""
3940
3941 #. type: Plain text
3942 #: build/C/man2/spu_create.2:199
3943 msgid "I<pathname> is too long."
3944 msgstr ""
3945
3946 #. type: TP
3947 #: build/C/man2/spu_create.2:199
3948 #, no-wrap
3949 msgid "B<ENFILE>"
3950 msgstr ""
3951
3952 #. type: Plain text
3953 #: build/C/man2/spu_create.2:202
3954 msgid "The system has reached the global open files limit."
3955 msgstr ""
3956
3957 #. type: Plain text
3958 #: build/C/man2/spu_create.2:206
3959 msgid ""
3960 "An isolated context was requested, but the hardware does not support SPU "
3961 "isolation."
3962 msgstr ""
3963
3964 #. type: Plain text
3965 #: build/C/man2/spu_create.2:211
3966 msgid "Part of I<pathname> could not be resolved."
3967 msgstr ""
3968
3969 #. type: Plain text
3970 #: build/C/man2/spu_create.2:214
3971 msgid "The kernel could not allocate all resources required."
3972 msgstr ""
3973
3974 #. type: TP
3975 #: build/C/man2/spu_create.2:214
3976 #, no-wrap
3977 msgid "B<ENOSPC>"
3978 msgstr ""
3979
3980 #. type: Plain text
3981 #: build/C/man2/spu_create.2:219
3982 msgid ""
3983 "There are not enough SPU resources available to create a new context or the "
3984 "user-specific limit for the number of SPU contexts has been reached."
3985 msgstr ""
3986
3987 #. type: TP
3988 #: build/C/man2/spu_create.2:219 build/C/man2/spu_run.2:179 build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143 build/C/man2/ustat.2:84
3989 #, no-wrap
3990 msgid "B<ENOSYS>"
3991 msgstr ""
3992
3993 #. type: Plain text
3994 #: build/C/man2/spu_create.2:224 build/C/man2/spu_run.2:184
3995 msgid ""
3996 "The functionality is not provided by the current system, because either the "
3997 "hardware does not provide SPUs or the spufs module is not loaded."
3998 msgstr ""
3999
4000 #. type: Plain text
4001 #: build/C/man2/spu_create.2:229
4002 msgid "A part of I<pathname> is not a directory."
4003 msgstr ""
4004
4005 #. type: Plain text
4006 #: build/C/man2/spu_create.2:236
4007 msgid ""
4008 "The I<SPU_CREATE_NOSCHED> flag has been given, but the user does not have "
4009 "the B<CAP_SYS_NICE> capability."
4010 msgstr ""
4011
4012 #. type: Plain text
4013 #: build/C/man2/spu_create.2:242
4014 msgid ""
4015 "I<pathname> must point to a location beneath the mount point of B<spufs>.  "
4016 "By convention, it gets mounted in I</spu>."
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man2/spu_create.2:246
4021 msgid "The B<spu_create>()  system call was added to Linux in kernel 2.6.16."
4022 msgstr ""
4023
4024 #. type: Plain text
4025 #: build/C/man2/spu_create.2:250
4026 msgid ""
4027 "This call is Linux-specific and only implemented on the PowerPC "
4028 "architecture.  Programs using this system call are not portable."
4029 msgstr ""
4030
4031 #. type: Plain text
4032 #: build/C/man2/spu_create.2:260
4033 msgid ""
4034 "Glibc does not provide a wrapper for this system call; call it using "
4035 "B<syscall>(2).  Note however, that B<spu_create>()  is meant to be used from "
4036 "libraries that implement a more abstract interface to SPUs, not to be used "
4037 "from regular applications.  See "
4038 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4039 "libraries."
4040 msgstr ""
4041
4042 #. type: Plain text
4043 #: build/C/man2/spu_create.2:265
4044 msgid "See B<spu_run>(2)  for an example of the use of B<spu_create>()"
4045 msgstr ""
4046
4047 #. type: Plain text
4048 #: build/C/man2/spu_create.2:270
4049 msgid "B<close>(2), B<spu_run>(2), B<capabilities>(7), B<spufs>(7)"
4050 msgstr ""
4051
4052 #. type: TH
4053 #: build/C/man2/spu_run.2:25
4054 #, no-wrap
4055 msgid "SPU_RUN"
4056 msgstr ""
4057
4058 #. type: TH
4059 #: build/C/man2/spu_run.2:25
4060 #, no-wrap
4061 msgid "2007-11-25"
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man2/spu_run.2:28
4066 msgid "spu_run - execute an SPU context"
4067 msgstr ""
4068
4069 #. type: Plain text
4070 #: build/C/man2/spu_run.2:31
4071 #, no-wrap
4072 msgid "B<#include E<lt>sys/spu.hE<gt>>\n"
4073 msgstr ""
4074
4075 #. type: Plain text
4076 #: build/C/man2/spu_run.2:34
4077 #, no-wrap
4078 msgid ""
4079 "B<int spu_run(int >I<fd>B<, unsigned int *>I<npc>B<, unsigned int "
4080 "*>I<event>B<);>\n"
4081 msgstr ""
4082
4083 #. type: Plain text
4084 #: build/C/man2/spu_run.2:49
4085 msgid ""
4086 "The B<spu_run>()  system call is used on PowerPC machines that implement the "
4087 "Cell Broadband Engine Architecture in order to access Synergistic Processor "
4088 "Units (SPUs).  The I<fd> argument is a file descriptor returned by "
4089 "B<spu_create>(2)  that refers to a specific SPU context.  When the context "
4090 "gets scheduled to a physical SPU, it starts execution at the instruction "
4091 "pointer passed in I<npc>."
4092 msgstr ""
4093
4094 #. type: Plain text
4095 #: build/C/man2/spu_run.2:58
4096 msgid ""
4097 "Execution of SPU code happens synchronously, meaning that B<spu_run>()  "
4098 "blocks while the SPU is still running.  If there is a need to execute SPU "
4099 "code in parallel with other code on either the main CPU or other SPUs, a new "
4100 "thread of execution must be created first (e.g., using "
4101 "B<pthread_create>(3))."
4102 msgstr ""
4103
4104 #. type: Plain text
4105 #: build/C/man2/spu_run.2:68
4106 msgid ""
4107 "When B<spu_run>()  returns, the current value of the SPU program counter is "
4108 "written to I<npc>, so successive calls to B<spu_run>()  can use the same "
4109 "I<npc> pointer."
4110 msgstr ""
4111
4112 #. type: Plain text
4113 #: build/C/man2/spu_run.2:78
4114 msgid ""
4115 "The I<event> argument provides a buffer for an extended status code.  If the "
4116 "SPU context was created with the B<SPU_CREATE_EVENTS_ENABLED> flag, then "
4117 "this buffer is populated by the Linux kernel before B<spu_run>()  returns."
4118 msgstr ""
4119
4120 #. type: Plain text
4121 #: build/C/man2/spu_run.2:80
4122 msgid "The status code may be one (or more) of the following constants:"
4123 msgstr ""
4124
4125 #. type: TP
4126 #: build/C/man2/spu_run.2:80
4127 #, no-wrap
4128 msgid "B<SPE_EVENT_DMA_ALIGNMENT>"
4129 msgstr ""
4130
4131 #. type: Plain text
4132 #: build/C/man2/spu_run.2:83
4133 msgid "A DMA alignment error occurred."
4134 msgstr ""
4135
4136 #. type: TP
4137 #: build/C/man2/spu_run.2:83
4138 #, no-wrap
4139 msgid "B<SPE_EVENT_INVALID_DMA>"
4140 msgstr ""
4141
4142 #. type: Plain text
4143 #: build/C/man2/spu_run.2:86
4144 msgid "An invalid MFC DMA command was attempted."
4145 msgstr ""
4146
4147 #. type: TP
4148 #: build/C/man2/spu_run.2:86
4149 #, no-wrap
4150 msgid "B<SPE_EVENT_SPE_DATA_STORAGE>"
4151 msgstr ""
4152
4153 #. type: Plain text
4154 #: build/C/man2/spu_run.2:89
4155 msgid "A DMA storage error occurred."
4156 msgstr ""
4157
4158 #. type: TP
4159 #: build/C/man2/spu_run.2:89
4160 #, no-wrap
4161 msgid "B<SPE_EVENT_SPE_ERROR>"
4162 msgstr ""
4163
4164 #. type: Plain text
4165 #: build/C/man2/spu_run.2:92
4166 msgid "An illegal instruction was executed."
4167 msgstr ""
4168
4169 #. type: Plain text
4170 #: build/C/man2/spu_run.2:98
4171 msgid ""
4172 "NULL is a valid value for the I<event> argument.  In this case, the events "
4173 "will not be reported to the calling process."
4174 msgstr ""
4175
4176 #. type: Plain text
4177 #: build/C/man2/spu_run.2:107
4178 msgid ""
4179 "On success, B<spu_run>()  returns the value of the I<spu_status> register.  "
4180 "On error it returns -1 and sets I<errno> to one of the error codes listed "
4181 "below."
4182 msgstr ""
4183
4184 #. type: Plain text
4185 #: build/C/man2/spu_run.2:116
4186 msgid ""
4187 "The I<spu_status> register value is a bit mask of status codes and "
4188 "optionally a 14-bit code returned from the B<stop-and-signal> instruction on "
4189 "the SPU.  The bit masks for the status codes are:"
4190 msgstr ""
4191
4192 #. type: TP
4193 #: build/C/man2/spu_run.2:116
4194 #, no-wrap
4195 msgid "B<0x02>"
4196 msgstr ""
4197
4198 #. type: Plain text
4199 #: build/C/man2/spu_run.2:121
4200 msgid "SPU was stopped by a B<stop-and-signal> instruction."
4201 msgstr ""
4202
4203 #. type: TP
4204 #: build/C/man2/spu_run.2:121
4205 #, no-wrap
4206 msgid "B<0x04>"
4207 msgstr ""
4208
4209 #. type: Plain text
4210 #: build/C/man2/spu_run.2:126
4211 msgid "SPU was stopped by a B<halt> instruction."
4212 msgstr ""
4213
4214 #. type: TP
4215 #: build/C/man2/spu_run.2:126
4216 #, no-wrap
4217 msgid "B<0x08>"
4218 msgstr ""
4219
4220 #. type: Plain text
4221 #: build/C/man2/spu_run.2:129
4222 msgid "SPU is waiting for a channel."
4223 msgstr ""
4224
4225 #. type: TP
4226 #: build/C/man2/spu_run.2:129
4227 #, no-wrap
4228 msgid "B<0x10>"
4229 msgstr ""
4230
4231 #. type: Plain text
4232 #: build/C/man2/spu_run.2:132
4233 msgid "SPU is in single-step mode."
4234 msgstr ""
4235
4236 #. type: TP
4237 #: build/C/man2/spu_run.2:132
4238 #, no-wrap
4239 msgid "B<0x20>"
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man2/spu_run.2:135
4244 msgid "SPU has tried to execute an invalid instruction."
4245 msgstr ""
4246
4247 #. type: TP
4248 #: build/C/man2/spu_run.2:135
4249 #, no-wrap
4250 msgid "B<0x40>"
4251 msgstr ""
4252
4253 #. type: Plain text
4254 #: build/C/man2/spu_run.2:138
4255 msgid "SPU has tried to access an invalid channel."
4256 msgstr ""
4257
4258 #. type: TP
4259 #: build/C/man2/spu_run.2:138
4260 #, no-wrap
4261 msgid "B<0x3fff0000>"
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man2/spu_run.2:144
4266 msgid ""
4267 "The bits masked with this value contain the code returned from a "
4268 "B<stop-and-signal> instruction.  These bits are only valid if the 0x02 bit "
4269 "is set."
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man2/spu_run.2:149
4274 msgid ""
4275 "If B<spu_run>()  has not returned an error, one or more bits among the lower "
4276 "eight ones are always set."
4277 msgstr ""
4278
4279 #. type: TP
4280 #: build/C/man2/spu_run.2:150 build/C/man2/stat.2:313 build/C/man2/statfs.2:140 build/C/man3/statvfs.3:107
4281 #, no-wrap
4282 msgid "B<EBADF>"
4283 msgstr ""
4284
4285 #. type: Plain text
4286 #: build/C/man2/spu_run.2:154
4287 msgid "I<fd> is not a valid file descriptor."
4288 msgstr ""
4289
4290 #. type: Plain text
4291 #: build/C/man2/spu_run.2:160
4292 msgid ""
4293 "I<npc> is not a valid pointer, or I<event> is non-NULL and an invalid "
4294 "pointer."
4295 msgstr ""
4296
4297 #. type: TP
4298 #: build/C/man2/spu_run.2:160 build/C/man2/statfs.2:151 build/C/man3/statvfs.3:118
4299 #, no-wrap
4300 msgid "B<EINTR>"
4301 msgstr ""
4302
4303 #. type: Plain text
4304 #: build/C/man2/spu_run.2:170
4305 msgid ""
4306 "A signal occurred while B<spu_run>()  was in progress; see B<signal>(7).  "
4307 "The I<npc> value has been updated to the new program counter value if "
4308 "necessary."
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man2/spu_run.2:175
4313 msgid "I<fd> is not a valid file descriptor returned from B<spu_create>(2)."
4314 msgstr ""
4315
4316 #. type: Plain text
4317 #: build/C/man2/spu_run.2:179
4318 msgid ""
4319 "There was not enough memory available to handle a page fault resulting from "
4320 "a Memory Flow Controller (MFC) direct memory access."
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man2/spu_run.2:188
4325 msgid "The B<spu_run>()  system call was added to Linux in kernel 2.6.16."
4326 msgstr ""
4327
4328 #. type: Plain text
4329 #: build/C/man2/spu_run.2:192
4330 msgid ""
4331 "This call is Linux-specific and only implemented by the PowerPC "
4332 "architecture.  Programs using this system call are not portable."
4333 msgstr ""
4334
4335 #. type: Plain text
4336 #: build/C/man2/spu_run.2:202
4337 msgid ""
4338 "Glibc does not provide a wrapper for this system call; call it using "
4339 "B<syscall>(2).  Note however, that B<spu_run>()  is meant to be used from "
4340 "libraries that implement a more abstract interface to SPUs, not to be used "
4341 "from regular applications.  See "
4342 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4343 "libraries."
4344 msgstr ""
4345
4346 #. type: Plain text
4347 #: build/C/man2/spu_run.2:207
4348 msgid ""
4349 "The following is an example of running a simple, one-instruction SPU program "
4350 "with the B<spu_run>()  system call."
4351 msgstr ""
4352
4353 #. type: Plain text
4354 #: build/C/man2/spu_run.2:215
4355 #, no-wrap
4356 msgid ""
4357 "#include E<lt>stdlib.hE<gt>\n"
4358 "#include E<lt>stdint.hE<gt>\n"
4359 "#include E<lt>unistd.hE<gt>\n"
4360 "#include E<lt>stdio.hE<gt>\n"
4361 "#include E<lt>sys/types.hE<gt>\n"
4362 "#include E<lt>fcntl.hE<gt>\n"
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man2/spu_run.2:218
4367 #, no-wrap
4368 msgid ""
4369 "#define handle_error(msg) \\e\n"
4370 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4371 msgstr ""
4372
4373 #. type: Plain text
4374 #: build/C/man2/spu_run.2:223
4375 #, no-wrap
4376 msgid ""
4377 "int main(void)\n"
4378 "{\n"
4379 "    int context, fd, spu_status;\n"
4380 "    uint32_t instruction, npc;\n"
4381 msgstr ""
4382
4383 #. type: Plain text
4384 #: build/C/man2/spu_run.2:227
4385 #, no-wrap
4386 msgid ""
4387 "    context = spu_create(\"/spu/example-context\", 0, 0755);\n"
4388 "    if (context == -1)\n"
4389 "        handle_error(\"spu_create\");\n"
4390 msgstr ""
4391
4392 #. type: Plain text
4393 #: build/C/man2/spu_run.2:232
4394 #, no-wrap
4395 msgid ""
4396 "    /* write a \\(aqstop 0x1234\\(aq instruction to the SPU\\(aqs\n"
4397 "     * local store memory\n"
4398 "     */\n"
4399 "    instruction = 0x00001234;\n"
4400 msgstr ""
4401
4402 #. type: Plain text
4403 #: build/C/man2/spu_run.2:237
4404 #, no-wrap
4405 msgid ""
4406 "    fd = open(\"/spu/example-context/mem\", O_RDWR);\n"
4407 "    if (fd == -1)\n"
4408 "        handle_error(\"open\");\n"
4409 "    write(fd, &instruction, sizeof(instruction));\n"
4410 msgstr ""
4411
4412 #. type: Plain text
4413 #: build/C/man2/spu_run.2:243
4414 #, no-wrap
4415 msgid ""
4416 "    /* set npc to the starting instruction address of the\n"
4417 "     * SPU program. Since we wrote the instruction at the\n"
4418 "     * start of the mem file, the entry point will be 0x0\n"
4419 "     */\n"
4420 "    npc = 0;\n"
4421 msgstr ""
4422
4423 #. type: Plain text
4424 #: build/C/man2/spu_run.2:247
4425 #, no-wrap
4426 msgid ""
4427 "    spu_status = spu_run(context, &npc, NULL);\n"
4428 "    if (spu_status == -1)\n"
4429 "        handle_error(\"open\");\n"
4430 msgstr ""
4431
4432 #. type: Plain text
4433 #: build/C/man2/spu_run.2:253
4434 #, no-wrap
4435 msgid ""
4436 "    /* we should see a status code of 0x1234002:\n"
4437 "     *   0x00000002 (spu was stopped due to stop-and-signal)\n"
4438 "     * | 0x12340000 (the stop-and-signal code)\n"
4439 "     */\n"
4440 "    printf(\"SPU Status: 0x%08x\\en\", spu_status);\n"
4441 msgstr ""
4442
4443 #. type: Plain text
4444 #: build/C/man2/spu_run.2:256 build/C/man2/stat.2:637
4445 #, no-wrap
4446 msgid ""
4447 "    exit(EXIT_SUCCESS);\n"
4448 "}\n"
4449 msgstr ""
4450
4451 #. type: Plain text
4452 #: build/C/man2/spu_run.2:264
4453 msgid "B<close>(2), B<spu_create>(2), B<capabilities>(7), B<spufs>(7)"
4454 msgstr ""
4455
4456 #. type: TH
4457 #: build/C/man7/spufs.7:26
4458 #, no-wrap
4459 msgid "SPUFS"
4460 msgstr ""
4461
4462 #. type: Plain text
4463 #: build/C/man7/spufs.7:29
4464 msgid "spufs - SPU file system"
4465 msgstr ""
4466
4467 #. type: Plain text
4468 #: build/C/man7/spufs.7:33
4469 msgid ""
4470 "The SPU file system is used on PowerPC machines that implement the Cell "
4471 "Broadband Engine Architecture in order to access Synergistic Processor Units "
4472 "(SPUs)."
4473 msgstr ""
4474
4475 #. type: Plain text
4476 #: build/C/man7/spufs.7:42
4477 msgid ""
4478 "The file system provides a name space similar to POSIX shared memory or "
4479 "message queues.  Users that have write permissions on the file system can "
4480 "use B<spu_create>(2)  to establish SPU contexts under the B<spufs> root "
4481 "directory."
4482 msgstr ""
4483
4484 #. type: Plain text
4485 #: build/C/man7/spufs.7:49
4486 msgid ""
4487 "Every SPU context is represented by a directory containing a predefined set "
4488 "of files.  These files can be used for manipulating the state of the logical "
4489 "SPU.  Users can change permissions on the files, but can't add or remove "
4490 "files."
4491 msgstr ""
4492
4493 #. type: SS
4494 #: build/C/man7/spufs.7:49
4495 #, no-wrap
4496 msgid "Mount Options"
4497 msgstr ""
4498
4499 #. type: TP
4500 #: build/C/man7/spufs.7:50
4501 #, no-wrap
4502 msgid "B<uid=E<lt>uidE<gt>>"
4503 msgstr ""
4504
4505 #. type: Plain text
4506 #: build/C/man7/spufs.7:53
4507 msgid "Set the user owning the mount point; the default is 0 (root)."
4508 msgstr ""
4509
4510 #. type: TP
4511 #: build/C/man7/spufs.7:53
4512 #, no-wrap
4513 msgid "B<gid=E<lt>gidE<gt>>"
4514 msgstr ""
4515
4516 #. type: Plain text
4517 #: build/C/man7/spufs.7:56
4518 msgid "Set the group owning the mount point; the default is 0 (root)."
4519 msgstr ""
4520
4521 #. type: TP
4522 #: build/C/man7/spufs.7:56
4523 #, no-wrap
4524 msgid "B<mode=E<lt>modeE<gt>>"
4525 msgstr ""
4526
4527 #. type: Plain text
4528 #: build/C/man7/spufs.7:62
4529 msgid ""
4530 "Set the mode of the top-level directory in B<spufs>, as an octal mode "
4531 "string.  The default is 0775."
4532 msgstr ""
4533
4534 #. type: SS
4535 #: build/C/man7/spufs.7:62
4536 #, no-wrap
4537 msgid "Files"
4538 msgstr ""
4539
4540 #. type: Plain text
4541 #: build/C/man7/spufs.7:74
4542 msgid ""
4543 "The files in B<spufs> mostly follow the standard behavior for regular system "
4544 "calls like B<read>(2)  or B<write>(2), but often support only a subset of "
4545 "the operations supported on regular file systems.  This list details the "
4546 "supported operations and the deviations from the standard behavior described "
4547 "in the respective man pages."
4548 msgstr ""
4549
4550 #. type: Plain text
4551 #: build/C/man7/spufs.7:96
4552 msgid ""
4553 "All files that support the B<read>(2)  operation also support B<readv>(2)  "
4554 "and all files that support the B<write>(2)  operation also support "
4555 "B<writev>(2).  All files support the B<access>(2)  and B<stat>(2)  family of "
4556 "operations, but for the latter call, the only fields of the returned I<stat> "
4557 "structure that contain reliable information are I<st_mode>, I<st_nlink>, "
4558 "I<st_uid>, and I<st_gid>."
4559 msgstr ""
4560
4561 #. type: Plain text
4562 #: build/C/man7/spufs.7:105
4563 msgid ""
4564 "All files support the B<chmod>(2)/B<fchmod>(2)  and B<chown>(2)/B<fchown>(2)  "
4565 "operations, but will not be able to grant permissions that contradict the "
4566 "possible operations (e.g., read access on the I<wbox> file)."
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man7/spufs.7:107
4571 msgid "The current set of files is:"
4572 msgstr ""
4573
4574 #. type: TP
4575 #: build/C/man7/spufs.7:107
4576 #, no-wrap
4577 msgid "I</capabilities>"
4578 msgstr ""
4579
4580 #. type: Plain text
4581 #: build/C/man7/spufs.7:112
4582 msgid ""
4583 "Contains a comma-delimited string representing the capabilities of this SPU "
4584 "context.  Possible capabilities are:"
4585 msgstr ""
4586
4587 #. type: TP
4588 #: build/C/man7/spufs.7:113
4589 #, no-wrap
4590 msgid "B<sched>"
4591 msgstr ""
4592
4593 #. type: Plain text
4594 #: build/C/man7/spufs.7:116
4595 msgid "This context may be scheduled."
4596 msgstr ""
4597
4598 #. type: TP
4599 #: build/C/man7/spufs.7:116
4600 #, no-wrap
4601 msgid "B<step>"
4602 msgstr ""
4603
4604 #. type: Plain text
4605 #: build/C/man7/spufs.7:119
4606 msgid "This context can be run in single-step mode, for debugging."
4607 msgstr ""
4608
4609 #. type: Plain text
4610 #: build/C/man7/spufs.7:121
4611 msgid "New capabilities flags may be added in the future."
4612 msgstr ""
4613
4614 #. type: TP
4615 #: build/C/man7/spufs.7:122
4616 #, no-wrap
4617 msgid "I</mem>"
4618 msgstr ""
4619
4620 #. type: Plain text
4621 #: build/C/man7/spufs.7:131
4622 msgid ""
4623 "the contents of the local storage memory of the SPU.  This can be accessed "
4624 "like a regular shared memory file and contains both code and data in the "
4625 "address space of the SPU.  The possible operations on an open I<mem> file "
4626 "are:"
4627 msgstr ""
4628
4629 #. type: TP
4630 #: build/C/man7/spufs.7:132
4631 #, no-wrap
4632 msgid "B<read>(2), B<pread>(2), B<write>(2), B<pwrite>(2), B<lseek>(2)"
4633 msgstr ""
4634
4635 #. type: Plain text
4636 #: build/C/man7/spufs.7:143
4637 msgid ""
4638 "These operate as usual, with the exception that B<lseek>(2), B<write>(2), "
4639 "and B<pwrite>(2)  are not supported beyond the end of the file.  The file "
4640 "size is the size of the local storage of the SPU, which is normally 256 "
4641 "kilobytes."
4642 msgstr ""
4643
4644 #. type: TP
4645 #: build/C/man7/spufs.7:143 build/C/man7/spufs.7:705 build/C/man7/spufs.7:724
4646 #, no-wrap
4647 msgid "B<mmap>(2)"
4648 msgstr ""
4649
4650 #. type: Plain text
4651 #: build/C/man7/spufs.7:152
4652 msgid ""
4653 "Mapping I<mem> into the process address space provides access to the SPU "
4654 "local storage within the process address space.  Only B<MAP_SHARED> mappings "
4655 "are allowed."
4656 msgstr ""
4657
4658 #. type: TP
4659 #: build/C/man7/spufs.7:153
4660 #, no-wrap
4661 msgid "I</regs>"
4662 msgstr ""
4663
4664 #. type: Plain text
4665 #: build/C/man7/spufs.7:160
4666 msgid ""
4667 "Contains the saved general-purpose registers of the SPU context.  This file "
4668 "contains the 128-bit values of each register, from register 0 to register "
4669 "127, in order.  This allows the general-purpose registers to be inspected "
4670 "for debugging."
4671 msgstr ""
4672
4673 #. type: Plain text
4674 #: build/C/man7/spufs.7:164
4675 msgid ""
4676 "Reading to or writing from this file requires that the context is scheduled "
4677 "out, so use of this file is not recommended in normal program operation."
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man7/spufs.7:170
4682 msgid ""
4683 "The I<regs> file is not present on contexts that have been created with the "
4684 "B<SPU_CREATE_NOSCHED> flag."
4685 msgstr ""
4686
4687 #. type: TP
4688 #: build/C/man7/spufs.7:170
4689 #, no-wrap
4690 msgid "I</mbox>"
4691 msgstr ""
4692
4693 #. type: Plain text
4694 #: build/C/man7/spufs.7:180
4695 msgid ""
4696 "The first SPU-to-CPU communication mailbox.  This file is read-only and can "
4697 "be read in units of 4 bytes.  The file can only be used in nonblocking mode "
4698 "- even B<poll>(2)  cannot be used to block on this file.  The only possible "
4699 "operation on an open I<mbox> file is:"
4700 msgstr ""
4701
4702 #. type: TP
4703 #: build/C/man7/spufs.7:181 build/C/man7/spufs.7:221 build/C/man7/spufs.7:316 build/C/man7/spufs.7:380 build/C/man7/spufs.7:417 build/C/man7/spufs.7:462 build/C/man7/spufs.7:516 build/C/man7/spufs.7:631 build/C/man7/spufs.7:675 build/C/man7/spufs.7:753
4704 #, no-wrap
4705 msgid "B<read>(2)"
4706 msgstr ""
4707
4708 #. type: Plain text
4709 #: build/C/man7/spufs.7:199
4710 msgid ""
4711 "If I<count> is smaller than four, B<read>(2)  returns -1 and sets I<errno> "
4712 "to B<EINVAL>.  If there is no data available in the mailbox (i.e., the SPU "
4713 "has not sent a mailbox message), the return value is set to -1 and I<errno> "
4714 "is set to B<EAGAIN>.  When data has been read successfully, four bytes are "
4715 "placed in the data buffer and the value four is returned."
4716 msgstr ""
4717
4718 #. type: TP
4719 #: build/C/man7/spufs.7:200
4720 #, no-wrap
4721 msgid "I</ibox>"
4722 msgstr ""
4723
4724 #. type: Plain text
4725 #: build/C/man7/spufs.7:216
4726 msgid ""
4727 "The second SPU-to-CPU communication mailbox.  This file is similar to the "
4728 "first mailbox file, but can be read in blocking I/O mode, thus calling "
4729 "B<read>(2)  on an open I<ibox> file will block until the SPU has written "
4730 "data to its interrupt mailbox channel (unless the file has been opened with "
4731 "B<O_NONBLOCK>, see below).  Also, B<poll>(2)  and similar system calls can "
4732 "be used to monitor for the presence of mailbox data."
4733 msgstr ""
4734
4735 #. type: Plain text
4736 #: build/C/man7/spufs.7:220
4737 msgid "The possible operations on an open I<ibox> file are:"
4738 msgstr ""
4739
4740 #. type: Plain text
4741 #: build/C/man7/spufs.7:238
4742 msgid ""
4743 "If I<count> is smaller than four, B<read>(2)  returns -1 and sets I<errno> "
4744 "to B<EINVAL>.  If there is no data available in the mailbox and the file "
4745 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4746 "and I<errno> is set to B<EAGAIN>."
4747 msgstr ""
4748
4749 #. type: Plain text
4750 #: build/C/man7/spufs.7:246
4751 msgid ""
4752 "If there is no data available in the mailbox and the file descriptor has "
4753 "been opened without B<O_NONBLOCK>, the call will block until the SPU writes "
4754 "to its interrupt mailbox channel.  When data has been read successfully, "
4755 "four bytes are placed in the data buffer and the value four is returned."
4756 msgstr ""
4757
4758 #. type: TP
4759 #: build/C/man7/spufs.7:246 build/C/man7/spufs.7:294 build/C/man7/spufs.7:684
4760 #, no-wrap
4761 msgid "B<poll>(2)"
4762 msgstr ""
4763
4764 #. type: Plain text
4765 #: build/C/man7/spufs.7:253
4766 msgid ""
4767 "Poll on the I<ibox> file returns I<(POLLIN | POLLRDNORM)> whenever data is "
4768 "available for reading."
4769 msgstr ""
4770
4771 #. type: TP
4772 #: build/C/man7/spufs.7:254
4773 #, no-wrap
4774 msgid "I</wbox>"
4775 msgstr ""
4776
4777 #. type: Plain text
4778 #: build/C/man7/spufs.7:266
4779 msgid ""
4780 "The CPU-to-SPU communication mailbox.  It is write-only and can be written "
4781 "in units of four bytes.  If the mailbox is full, B<write>(2)  will block, "
4782 "and B<poll>(2)  can be used to block until the mailbox is available for "
4783 "writing again.  The possible operations on an open I<wbox> file are:"
4784 msgstr ""
4785
4786 #. type: TP
4787 #: build/C/man7/spufs.7:267 build/C/man7/spufs.7:391 build/C/man7/spufs.7:431 build/C/man7/spufs.7:475 build/C/man7/spufs.7:526 build/C/man7/spufs.7:637 build/C/man7/spufs.7:651 build/C/man7/spufs.7:748
4788 #, no-wrap
4789 msgid "B<write>(2)"
4790 msgstr ""
4791
4792 #. type: Plain text
4793 #: build/C/man7/spufs.7:285
4794 msgid ""
4795 "If I<count> is smaller than four, B<write>(2)  returns -1 and sets I<errno> "
4796 "to B<EINVAL>.  If there is no space available in the mailbox and the file "
4797 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4798 "and I<errno> is set to B<EAGAIN>."
4799 msgstr ""
4800
4801 #. type: Plain text
4802 #: build/C/man7/spufs.7:294
4803 msgid ""
4804 "If there is no space available in the mailbox and the file descriptor has "
4805 "been opened without B<O_NONBLOCK>, the call will block until the SPU reads "
4806 "from its PPE (PowerPC Processing Element)  mailbox channel.  When data has "
4807 "been written successfully, the system call returns four as its function "
4808 "result."
4809 msgstr ""
4810
4811 #. type: Plain text
4812 #: build/C/man7/spufs.7:301
4813 msgid ""
4814 "A poll on the I<wbox> file returns I<(POLLOUT | POLLWRNORM)> whenever space "
4815 "is available for writing."
4816 msgstr ""
4817
4818 #. type: TP
4819 #: build/C/man7/spufs.7:302
4820 #, no-wrap
4821 msgid "I</mbox_stat>, I</ibox_stat>, I</wbox_stat>"
4822 msgstr ""
4823
4824 #. type: Plain text
4825 #: build/C/man7/spufs.7:315
4826 msgid ""
4827 "These are read-only files that contain the length of the current queue of "
4828 "each mailbox, i.e., how many words can be read from I<mbox> or I<ibox> or "
4829 "how many words can be written to I<wbox> without blocking.  The files can be "
4830 "read only in four-byte units and return a big-endian binary integer number.  "
4831 "The only possible operation on an open I<*box_stat> file is:"
4832 msgstr ""
4833
4834 #. type: Plain text
4835 #: build/C/man7/spufs.7:336
4836 msgid ""
4837 "If I<count> is smaller than four, B<read>(2)  returns -1 and sets I<errno> "
4838 "to B<EINVAL>.  Otherwise, a four-byte value is placed in the data buffer.  "
4839 "This value is the number of elements that can be read from (for I<mbox_stat> "
4840 "and I<ibox_stat>)  or written to (for I<wbox_stat>)  the respective mailbox "
4841 "without blocking or returning an B<EAGAIN> error."
4842 msgstr ""
4843
4844 #. type: TP
4845 #: build/C/man7/spufs.7:337
4846 #, no-wrap
4847 msgid ""
4848 "I</npc>, I</decr>, I</decr_status>, I</spu_tag_mask>, I</event_mask>, "
4849 "I</event_status>, I</srr0>, I</lslr>"
4850 msgstr ""
4851
4852 #. type: Plain text
4853 #: build/C/man7/spufs.7:349
4854 msgid ""
4855 "Internal registers of the SPU.  These files contain an ASCII string "
4856 "representing the hex value of the specified register.  Reads and writes on "
4857 "these files (except for I<npc>, see below) require that the SPU context be "
4858 "scheduled out, so frequent access to these files is not recommended for "
4859 "normal program operation."
4860 msgstr ""
4861
4862 #. type: Plain text
4863 #: build/C/man7/spufs.7:351
4864 msgid "The contents of these files are:"
4865 msgstr ""
4866
4867 #. type: TP
4868 #: build/C/man7/spufs.7:352
4869 #, no-wrap
4870 msgid "I<npc>"
4871 msgstr ""
4872
4873 #. type: Plain text
4874 #: build/C/man7/spufs.7:355
4875 msgid "Next Program Counter - only valid when the SPU is in a stopped state."
4876 msgstr ""
4877
4878 #. type: TP
4879 #: build/C/man7/spufs.7:355
4880 #, no-wrap
4881 msgid "I<decr>"
4882 msgstr ""
4883
4884 #. type: Plain text
4885 #: build/C/man7/spufs.7:358
4886 msgid "SPU Decrementer"
4887 msgstr ""
4888
4889 #. type: TP
4890 #: build/C/man7/spufs.7:358
4891 #, no-wrap
4892 msgid "I<decr_status>"
4893 msgstr ""
4894
4895 #. type: Plain text
4896 #: build/C/man7/spufs.7:361
4897 msgid "Decrementer Status"
4898 msgstr ""
4899
4900 #. type: TP
4901 #: build/C/man7/spufs.7:361
4902 #, no-wrap
4903 msgid "I<spu_tag_mask>"
4904 msgstr ""
4905
4906 #. type: Plain text
4907 #: build/C/man7/spufs.7:364
4908 msgid "MFC tag mask for SPU DMA"
4909 msgstr ""
4910
4911 #. type: TP
4912 #: build/C/man7/spufs.7:364
4913 #, no-wrap
4914 msgid "I<event_mask>"
4915 msgstr ""
4916
4917 #. type: Plain text
4918 #: build/C/man7/spufs.7:367
4919 msgid "Event mask for SPU interrupts"
4920 msgstr ""
4921
4922 #. type: TP
4923 #: build/C/man7/spufs.7:367
4924 #, no-wrap
4925 msgid "I<event_status>"
4926 msgstr ""
4927
4928 #. type: Plain text
4929 #: build/C/man7/spufs.7:370
4930 msgid "Number of SPU events pending (read-only)"
4931 msgstr ""
4932
4933 #. type: TP
4934 #: build/C/man7/spufs.7:370
4935 #, no-wrap
4936 msgid "I<srr0>"
4937 msgstr ""
4938
4939 #. type: Plain text
4940 #: build/C/man7/spufs.7:373
4941 msgid "Interrupt Return address register"
4942 msgstr ""
4943
4944 #. type: TP
4945 #: build/C/man7/spufs.7:373
4946 #, no-wrap
4947 msgid "I<lslr>"
4948 msgstr ""
4949
4950 #. type: Plain text
4951 #: build/C/man7/spufs.7:376
4952 msgid "Local Store Limit Register"
4953 msgstr ""
4954
4955 #. type: Plain text
4956 #: build/C/man7/spufs.7:379
4957 msgid "The possible operations on these files are:"
4958 msgstr ""
4959
4960 #. type: Plain text
4961 #: build/C/man7/spufs.7:387
4962 msgid ""
4963 "Reads the current register value.  If the register value is larger than the "
4964 "buffer passed to the B<read>(2)  system call, subsequent reads will continue "
4965 "reading from the same buffer, until the end of the buffer is reached."
4966 msgstr ""
4967
4968 #. type: Plain text
4969 #: build/C/man7/spufs.7:391
4970 msgid ""
4971 "When a complete string has been read, all subsequent read operations will "
4972 "return zero bytes and a new file descriptor needs to be opened to read a new "
4973 "value."
4974 msgstr ""
4975
4976 #. type: Plain text
4977 #: build/C/man7/spufs.7:401 build/C/man7/spufs.7:536
4978 msgid ""
4979 "A B<write>(2)  operation on the file sets the register to the value given in "
4980 "the string.  The string is parsed from the beginning until the first "
4981 "nonnumeric character or the end of the buffer.  Subsequent writes to the "
4982 "same file descriptor overwrite the previous setting."
4983 msgstr ""
4984
4985 #. type: Plain text
4986 #: build/C/man7/spufs.7:408
4987 msgid ""
4988 "Except for the I<npc> file, these files are not present on contexts that "
4989 "have been created with the B<SPU_CREATE_NOSCHED> flag."
4990 msgstr ""
4991
4992 #. type: TP
4993 #: build/C/man7/spufs.7:409
4994 #, no-wrap
4995 msgid "I</fpcr>"
4996 msgstr ""
4997
4998 #. type: Plain text
4999 #: build/C/man7/spufs.7:416
5000 msgid ""
5001 "This file provides access to the Floating Point Status and Control Register "
5002 "(fcpr) as a binary, four-byte file.  The operations on the I<fpcr> file are:"
5003 msgstr ""
5004
5005 #. type: Plain text
5006 #: build/C/man7/spufs.7:431
5007 msgid ""
5008 "If I<count> is smaller than four, B<read>(2)  returns -1 and sets I<errno> "
5009 "to B<EINVAL>.  Otherwise, a four-byte value is placed in the data buffer; "
5010 "this is the current value of the I<fpcr> register."
5011 msgstr ""
5012
5013 #. type: Plain text
5014 #: build/C/man7/spufs.7:445
5015 msgid ""
5016 "If I<count> is smaller than four, B<write>(2)  returns -1 and sets I<errno> "
5017 "to B<EINVAL>.  Otherwise, a four-byte value is copied from the data buffer, "
5018 "updating the value of the I<fpcr> register."
5019 msgstr ""
5020
5021 #. type: TP
5022 #: build/C/man7/spufs.7:446
5023 #, no-wrap
5024 msgid "I</signal1>, I</signal2>"
5025 msgstr ""
5026
5027 #. type: Plain text
5028 #: build/C/man7/spufs.7:461
5029 msgid ""
5030 "The files provide access to the two signal notification channels of an SPU.  "
5031 "These are read-write files that operate on four-byte words.  Writing to one "
5032 "of these files triggers an interrupt on the SPU.  The value written to the "
5033 "signal files can be read from the SPU through a channel read or from host "
5034 "user space through the file.  After the value has been read by the SPU, it "
5035 "is reset to zero.  The possible operations on an open I<signal1> or "
5036 "I<signal2> file are:"
5037 msgstr ""
5038
5039 #. type: Plain text
5040 #: build/C/man7/spufs.7:475
5041 msgid ""
5042 "If I<count> is smaller than four, B<read>(2)  returns -1 and sets I<errno> "
5043 "to B<EINVAL>.  Otherwise, a four-byte value is placed in the data buffer; "
5044 "this is the current value of the specified signal notification register."
5045 msgstr ""
5046
5047 #. type: Plain text
5048 #: build/C/man7/spufs.7:496
5049 msgid ""
5050 "If I<count> is smaller than four, B<write>(2)  returns -1 and sets I<errno> "
5051 "to B<EINVAL>.  Otherwise, a four-byte value is copied from the data buffer, "
5052 "updating the value of the specified signal notification register.  The "
5053 "signal notification register will either be replaced with the input data or "
5054 "will be updated to the bitwise OR operation of the old value and the input "
5055 "data, depending on the contents of the I<signal1_type> or I<signal2_type> "
5056 "files respectively."
5057 msgstr ""
5058
5059 #. type: TP
5060 #: build/C/man7/spufs.7:497
5061 #, no-wrap
5062 msgid "I</signal1_type>, I</signal2_type>"
5063 msgstr ""
5064
5065 #. type: Plain text
5066 #: build/C/man7/spufs.7:515
5067 msgid ""
5068 "These two files change the behavior of the I<signal1> and I<signal2> "
5069 "notification files.  They contain a numeric ASCII string which is read as "
5070 "either \"1\" or \"0\".  In mode 0 (overwrite), the hardware replaces the "
5071 "contents of the signal channel with the data that is written to it.  In mode "
5072 "1 (logical OR), the hardware accumulates the bits that are subsequently "
5073 "written to it.  The possible operations on an open I<signal1_type> or "
5074 "I<signal2_type> file are:"
5075 msgstr ""
5076
5077 #. type: Plain text
5078 #: build/C/man7/spufs.7:526
5079 msgid ""
5080 "When the count supplied to the B<read>(2)  call is shorter than the required "
5081 "length for the digit (plus a newline character), subsequent reads from the "
5082 "same file descriptor will complete the string.  When a complete string has "
5083 "been read, all subsequent read operations will return zero bytes and a new "
5084 "file descriptor needs to be opened to read the value again."
5085 msgstr ""
5086
5087 #. type: TP
5088 #: build/C/man7/spufs.7:537
5089 #, no-wrap
5090 msgid "I</mbox_info>, I</ibox_info>, I</wbox_info>, I</dma_into>, I</proxydma_info>"
5091 msgstr ""
5092
5093 #. type: Plain text
5094 #: build/C/man7/spufs.7:556
5095 msgid ""
5096 "Read-only files that contain the saved state of the SPU mailboxes and DMA "
5097 "queues.  This allows the SPU status to be inspected, mainly for debugging.  "
5098 "The I<mbox_info> and I<ibox_info> files each contain the four-byte mailbox "
5099 "message that has been written by the SPU.  If no message has been written to "
5100 "these mailboxes, then contents of these files is undefined.  The "
5101 "I<mbox_stat>, I<ibox_stat> and I<wbox_stat> files contain the available "
5102 "message count."
5103 msgstr ""
5104
5105 #. type: Plain text
5106 #: build/C/man7/spufs.7:565
5107 msgid ""
5108 "The I<wbox_info> file contains an array of four-byte mailbox messages, which "
5109 "have been sent to the SPU.  With current CBEA machines, the array is four "
5110 "items in length, so up to 4 * 4 = 16 bytes can be read from this file.  If "
5111 "any mailbox queue entry is empty, then the bytes read at the corresponding "
5112 "location are undefined."
5113 msgstr ""
5114
5115 #. type: Plain text
5116 #: build/C/man7/spufs.7:570
5117 msgid ""
5118 "The I<dma_info> file contains the contents of the SPU MFC DMA queue, "
5119 "represented as the following structure:"
5120 msgstr ""
5121
5122 #. type: Plain text
5123 #: build/C/man7/spufs.7:581
5124 #, no-wrap
5125 msgid ""
5126 "struct spu_dma_info {\n"
5127 "    uint64_t         dma_info_type;\n"
5128 "    uint64_t         dma_info_mask;\n"
5129 "    uint64_t         dma_info_status;\n"
5130 "    uint64_t         dma_info_stall_and_notify;\n"
5131 "    uint64_t         dma_info_atomic_command_status;\n"
5132 "    struct mfc_cq_sr dma_info_command_data[16];\n"
5133 "};\n"
5134 msgstr ""
5135
5136 #. type: Plain text
5137 #: build/C/man7/spufs.7:589
5138 msgid ""
5139 "The last member of this data structure is the actual DMA queue, containing "
5140 "16 entries.  The I<mfc_cq_sr> structure is defined as:"
5141 msgstr ""
5142
5143 #. type: Plain text
5144 #: build/C/man7/spufs.7:598
5145 #, no-wrap
5146 msgid ""
5147 "struct mfc_cq_sr {\n"
5148 "    uint64_t mfc_cq_data0_RW;\n"
5149 "    uint64_t mfc_cq_data1_RW;\n"
5150 "    uint64_t mfc_cq_data2_RW;\n"
5151 "    uint64_t mfc_cq_data3_RW;\n"
5152 "};\n"
5153 msgstr ""
5154
5155 #. type: Plain text
5156 #: build/C/man7/spufs.7:606
5157 msgid ""
5158 "The I<proxydma_info> file contains similar information, but describes the "
5159 "proxy DMA queue (i.e., DMAs initiated by entities outside the SPU) instead.  "
5160 "The file is in the following format:"
5161 msgstr ""
5162
5163 #. type: Plain text
5164 #: build/C/man7/spufs.7:615
5165 #, no-wrap
5166 msgid ""
5167 "struct spu_proxydma_info {\n"
5168 "    uint64_t         proxydma_info_type;\n"
5169 "    uint64_t         proxydma_info_mask;\n"
5170 "    uint64_t         proxydma_info_status;\n"
5171 "    struct mfc_cq_sr proxydma_info_command_data[8];\n"
5172 "};\n"
5173 msgstr ""
5174
5175 #. type: Plain text
5176 #: build/C/man7/spufs.7:621
5177 msgid ""
5178 "Accessing these files requires that the SPU context is scheduled out - "
5179 "frequent use can be inefficient.  These files should not be used for normal "
5180 "program operation."
5181 msgstr ""
5182
5183 #. type: Plain text
5184 #: build/C/man7/spufs.7:625
5185 msgid ""
5186 "These files are not present on contexts that have been created with the "
5187 "B<SPU_CREATE_NOSCHED> flag."
5188 msgstr ""
5189
5190 #. type: TP
5191 #: build/C/man7/spufs.7:625
5192 #, no-wrap
5193 msgid "I</cntl>"
5194 msgstr ""
5195
5196 #. type: Plain text
5197 #: build/C/man7/spufs.7:630
5198 msgid ""
5199 "This file provides access to the SPU Run Control and SPU status registers, "
5200 "as an ASCII string.  The following operations are supported:"
5201 msgstr ""
5202
5203 #. type: Plain text
5204 #: build/C/man7/spufs.7:637
5205 msgid ""
5206 "Reads from the I<cntl> file will return an ASCII string with the hex value "
5207 "of the SPU Status register."
5208 msgstr ""
5209
5210 #. type: Plain text
5211 #: build/C/man7/spufs.7:642
5212 msgid "Writes to the I<cntl> file will set the context's SPU Run Control register."
5213 msgstr ""
5214
5215 #. type: TP
5216 #: build/C/man7/spufs.7:643
5217 #, no-wrap
5218 msgid "I</mfc>"
5219 msgstr ""
5220
5221 #. type: Plain text
5222 #: build/C/man7/spufs.7:650
5223 msgid ""
5224 "Provides access to the Memory Flow Controller of the SPU.  Reading from the "
5225 "file returns the contents of the SPU's MFC Tag Status register, and writing "
5226 "to the file initiates a DMA from the MFC.  The following operations are "
5227 "supported:"
5228 msgstr ""
5229
5230 #. type: Plain text
5231 #: build/C/man7/spufs.7:655
5232 msgid ""
5233 "Writes to this file need to be in the format of a MFC DMA command, defined "
5234 "as follows:"
5235 msgstr ""
5236
5237 #. type: Plain text
5238 #: build/C/man7/spufs.7:667
5239 #, no-wrap
5240 msgid ""
5241 "struct mfc_dma_command {\n"
5242 "    int32_t  pad;    /* reserved */\n"
5243 "    uint32_t lsa;    /* local storage address */\n"
5244 "    uint64_t ea;     /* effective address */\n"
5245 "    uint16_t size;   /* transfer size */\n"
5246 "    uint16_t tag;    /* command tag */\n"
5247 "    uint16_t class;  /* class ID */\n"
5248 "    uint16_t cmd;    /* command opcode */\n"
5249 "};\n"
5250 msgstr ""
5251
5252 #. type: Plain text
5253 #: build/C/man7/spufs.7:675
5254 msgid ""
5255 "Writes are required to be exactly I<sizeof(struct mfc_dma_command)> bytes in "
5256 "size.  The command will be sent to the SPU's MFC proxy queue, and the tag "
5257 "stored in the kernel (see below)."
5258 msgstr ""
5259
5260 #. type: Plain text
5261 #: build/C/man7/spufs.7:684
5262 msgid ""
5263 "Reads the contents of the tag status register.  If the file is opened in "
5264 "blocking mode (i.e., without B<O_NONBLOCK>), then the read will block until "
5265 "a DMA tag (as performed by a previous write) is complete.  In nonblocking "
5266 "mode, the MFC tag status register will be returned without waiting."
5267 msgstr ""
5268
5269 #. type: Plain text
5270 #: build/C/man7/spufs.7:697
5271 msgid ""
5272 "Calling B<poll>(2)  on the I<mfc> file will block until a new DMA can be "
5273 "started (by checking for B<POLLOUT>)  or until a previously started DMA (by "
5274 "checking for B<POLLIN>)  has been completed."
5275 msgstr ""
5276
5277 #. type: Plain text
5278 #: build/C/man7/spufs.7:703
5279 msgid ""
5280 "I</mss> Provides access to the MFC MultiSource Synchronization (MSS) "
5281 "facility.  By B<mmap>(2)-ing this file, processes can access the MSS area of "
5282 "the SPU."
5283 msgstr ""
5284
5285 #. type: Plain text
5286 #: build/C/man7/spufs.7:705 build/C/man7/spufs.7:723
5287 msgid "The following operations are supported:"
5288 msgstr ""
5289
5290 #. type: Plain text
5291 #: build/C/man7/spufs.7:714
5292 msgid ""
5293 "Mapping B<mss> into the process address space gives access to the SPU MSS "
5294 "area within the process address space.  Only B<MAP_SHARED> mappings are "
5295 "allowed."
5296 msgstr ""
5297
5298 #. type: TP
5299 #: build/C/man7/spufs.7:715
5300 #, no-wrap
5301 msgid "I</psmap>"
5302 msgstr ""
5303
5304 #. type: Plain text
5305 #: build/C/man7/spufs.7:721
5306 msgid ""
5307 "Provides access to the whole problem-state mapping of the SPU.  Applications "
5308 "can use this area to interface to the SPU, rather than writing to individual "
5309 "register files in B<spufs>."
5310 msgstr ""
5311
5312 #. type: Plain text
5313 #: build/C/man7/spufs.7:732
5314 msgid ""
5315 "Mapping B<psmap> gives a process a direct map of the SPU problem state "
5316 "area.  Only B<MAP_SHARED> mappings are supported."
5317 msgstr ""
5318
5319 #. type: TP
5320 #: build/C/man7/spufs.7:733
5321 #, no-wrap
5322 msgid "I</phys-id>"
5323 msgstr ""
5324
5325 #. type: Plain text
5326 #: build/C/man7/spufs.7:739
5327 msgid ""
5328 "Read-only file containing the physical SPU number that the SPU context is "
5329 "running on.  When the context is not running, this file contains the string "
5330 "\"-1\"."
5331 msgstr ""
5332
5333 #. type: Plain text
5334 #: build/C/man7/spufs.7:741
5335 msgid "The physical SPU number is given by an ASCII hex string."
5336 msgstr ""
5337
5338 #. type: TP
5339 #: build/C/man7/spufs.7:741
5340 #, no-wrap
5341 msgid "I</object-id>"
5342 msgstr ""
5343
5344 #. type: Plain text
5345 #: build/C/man7/spufs.7:747
5346 msgid ""
5347 "Allows applications to store (or retrieve) a single 64-bit ID into the "
5348 "context.  This ID is later used by profiling tools to uniquely identify the "
5349 "context."
5350 msgstr ""
5351
5352 #. type: Plain text
5353 #: build/C/man7/spufs.7:753
5354 msgid ""
5355 "By writing an ASCII hex value into this file, applications can set the "
5356 "object ID of the SPU context.  Any previous value of the object ID is "
5357 "overwritten."
5358 msgstr ""
5359
5360 #. type: Plain text
5361 #: build/C/man7/spufs.7:757
5362 msgid ""
5363 "Reading this file gives an ASCII hex string representing the object ID for "
5364 "this SPU context."
5365 msgstr ""
5366
5367 #. type: TP
5368 #: build/C/man7/spufs.7:759
5369 #, no-wrap
5370 msgid "I</etc/fstab>  entry"
5371 msgstr ""
5372
5373 #.  .SH AUTHORS
5374 #.  Arnd Bergmann <arndb@de.ibm.com>, Mark Nutter <mnutter@us.ibm.com>,
5375 #.  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Jeremy Kerr <jk@ozlabs.org>
5376 #. type: Plain text
5377 #: build/C/man7/spufs.7:765
5378 msgid "none \t/spu \tspufs \tgid=spu \t0\t0"
5379 msgstr ""
5380
5381 #. type: Plain text
5382 #: build/C/man7/spufs.7:771
5383 msgid ""
5384 "B<close>(2), B<spu_create>(2), B<spu_run>(2), B<capabilities>(7), I<The Cell "
5385 "Broadband Engine Architecture (CBEA) specification>"
5386 msgstr ""
5387
5388 #. type: TH
5389 #: build/C/man2/stat.2:40
5390 #, no-wrap
5391 msgid "STAT"
5392 msgstr ""
5393
5394 #. type: TH
5395 #: build/C/man2/stat.2:40
5396 #, no-wrap
5397 msgid "2011-10-04"
5398 msgstr ""
5399
5400 #. type: Plain text
5401 #: build/C/man2/stat.2:43
5402 msgid "stat, fstat, lstat - get file status"
5403 msgstr ""
5404
5405 #. type: Plain text
5406 #: build/C/man2/stat.2:45
5407 msgid "B<#include E<lt>sys/types.hE<gt>>"
5408 msgstr ""
5409
5410 #. type: Plain text
5411 #: build/C/man2/stat.2:47
5412 msgid "B<#include E<lt>sys/stat.hE<gt>>"
5413 msgstr ""
5414
5415 #. type: Plain text
5416 #: build/C/man2/stat.2:49
5417 msgid "B<#include E<lt>unistd.hE<gt>>"
5418 msgstr ""
5419
5420 #. type: Plain text
5421 #: build/C/man2/stat.2:51
5422 msgid "B<int stat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5423 msgstr ""
5424
5425 #. type: Plain text
5426 #: build/C/man2/stat.2:53
5427 msgid "B<int fstat(int >I<fd>B<, struct stat *>I<buf>B<);>"
5428 msgstr ""
5429
5430 #. type: Plain text
5431 #: build/C/man2/stat.2:55
5432 msgid "B<int lstat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5433 msgstr ""
5434
5435 #. type: Plain text
5436 #: build/C/man2/stat.2:64
5437 msgid "B<lstat>():"
5438 msgstr ""
5439
5440 #. type: Plain text
5441 #: build/C/man2/stat.2:67
5442 msgid ""
5443 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5444 "_XOPEN_SOURCE_EXTENDED"
5445 msgstr ""
5446
5447 #. type: Plain text
5448 #: build/C/man2/stat.2:69
5449 msgid "|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5450 msgstr ""
5451
5452 #. type: Plain text
5453 #: build/C/man2/stat.2:83
5454 msgid ""
5455 "These functions return information about a file.  No permissions are "
5456 "required on the file itself, but\\(emin the case of B<stat>()  and "
5457 "B<lstat>()  \\(em execute (search) permission is required on all of the "
5458 "directories in I<path> that lead to the file."
5459 msgstr ""
5460
5461 #. type: Plain text
5462 #: build/C/man2/stat.2:89
5463 msgid "B<stat>()  stats the file pointed to by I<path> and fills in I<buf>."
5464 msgstr ""
5465
5466 #. type: Plain text
5467 #: build/C/man2/stat.2:97
5468 msgid ""
5469 "B<lstat>()  is identical to B<stat>(), except that if I<path> is a symbolic "
5470 "link, then the link itself is stat-ed, not the file that it refers to."
5471 msgstr ""
5472
5473 #. type: Plain text
5474 #: build/C/man2/stat.2:103
5475 msgid ""
5476 "B<fstat>()  is identical to B<stat>(), except that the file to be stat-ed is "
5477 "specified by the file descriptor I<fd>."
5478 msgstr ""
5479
5480 #. type: Plain text
5481 #: build/C/man2/stat.2:107
5482 msgid ""
5483 "All of these system calls return a I<stat> structure, which contains the "
5484 "following fields:"
5485 msgstr ""
5486
5487 #. type: Plain text
5488 #: build/C/man2/stat.2:125
5489 #, no-wrap
5490 msgid ""
5491 "struct stat {\n"
5492 "    dev_t     st_dev;     /* ID of device containing file */\n"
5493 "    ino_t     st_ino;     /* inode number */\n"
5494 "    mode_t    st_mode;    /* protection */\n"
5495 "    nlink_t   st_nlink;   /* number of hard links */\n"
5496 "    uid_t     st_uid;     /* user ID of owner */\n"
5497 "    gid_t     st_gid;     /* group ID of owner */\n"
5498 "    dev_t     st_rdev;    /* device ID (if special file) */\n"
5499 "    off_t     st_size;    /* total size, in bytes */\n"
5500 "    blksize_t st_blksize; /* blocksize for file system I/O */\n"
5501 "    blkcnt_t  st_blocks;  /* number of 512B blocks allocated */\n"
5502 "    time_t    st_atime;   /* time of last access */\n"
5503 "    time_t    st_mtime;   /* time of last modification */\n"
5504 "    time_t    st_ctime;   /* time of last status change */\n"
5505 "};\n"
5506 msgstr ""
5507
5508 #. type: Plain text
5509 #: build/C/man2/stat.2:136
5510 msgid ""
5511 "The I<st_dev> field describes the device on which this file resides.  (The "
5512 "B<major>(3)  and B<minor>(3)  macros may be useful to decompose the device "
5513 "ID in this field.)"
5514 msgstr ""
5515
5516 #. type: Plain text
5517 #: build/C/man2/stat.2:140
5518 msgid "The I<st_rdev> field describes the device that this file (inode) represents."
5519 msgstr ""
5520
5521 #. type: Plain text
5522 #: build/C/man2/stat.2:147
5523 msgid ""
5524 "The I<st_size> field gives the size of the file (if it is a regular file or "
5525 "a symbolic link) in bytes.  The size of a symbolic link is the length of the "
5526 "pathname it contains, without a terminating null byte."
5527 msgstr ""
5528
5529 #. type: Plain text
5530 #: build/C/man2/stat.2:154
5531 msgid ""
5532 "The I<st_blocks> field indicates the number of blocks allocated to the file, "
5533 "512-byte units.  (This may be smaller than I<st_size>/512 when the file has "
5534 "holes.)"
5535 msgstr ""
5536
5537 #. type: Plain text
5538 #: build/C/man2/stat.2:160
5539 msgid ""
5540 "The I<st_blksize> field gives the \"preferred\" blocksize for efficient file "
5541 "system I/O.  (Writing to a file in smaller chunks may cause an inefficient "
5542 "read-modify-rewrite.)"
5543 msgstr ""
5544
5545 #. type: Plain text
5546 #: build/C/man2/stat.2:181
5547 msgid ""
5548 "Not all of the Linux file systems implement all of the time fields.  Some "
5549 "file system types allow mounting in such a way that file and/or directory "
5550 "accesses do not cause an update of the I<st_atime> field.  (See I<noatime>, "
5551 "I<nodiratime>, and I<relatime> in B<mount>(8), and related information in "
5552 "B<mount>(2).)  In addition, I<st_atime> is not updated if a file is opened "
5553 "with the B<O_NOATIME>; see B<open>(2)."
5554 msgstr ""
5555
5556 #. type: Plain text
5557 #: build/C/man2/stat.2:196
5558 msgid ""
5559 "The field I<st_atime> is changed by file accesses, for example, by "
5560 "B<execve>(2), B<mknod>(2), B<pipe>(2), B<utime>(2)  and B<read>(2)  (of more "
5561 "than zero bytes).  Other routines, like B<mmap>(2), may or may not update "
5562 "I<st_atime>."
5563 msgstr ""
5564
5565 #. type: Plain text
5566 #: build/C/man2/stat.2:215
5567 msgid ""
5568 "The field I<st_mtime> is changed by file modifications, for example, by "
5569 "B<mknod>(2), B<truncate>(2), B<utime>(2)  and B<write>(2)  (of more than "
5570 "zero bytes).  Moreover, I<st_mtime> of a directory is changed by the "
5571 "creation or deletion of files in that directory.  The I<st_mtime> field is "
5572 "I<not> changed for changes in owner, group, hard link count, or mode."
5573 msgstr ""
5574
5575 #. type: Plain text
5576 #: build/C/man2/stat.2:220
5577 msgid ""
5578 "The field I<st_ctime> is changed by writing or by setting inode information "
5579 "(i.e., owner, group, link count, mode, etc.)."
5580 msgstr ""
5581
5582 #. type: Plain text
5583 #: build/C/man2/stat.2:224
5584 msgid ""
5585 "The following POSIX macros are defined to check the file type using the "
5586 "I<st_mode> field:"
5587 msgstr ""
5588
5589 #. type: TP
5590 #: build/C/man2/stat.2:225
5591 #, no-wrap
5592 msgid "B<S_ISREG>(m)"
5593 msgstr ""
5594
5595 #. type: Plain text
5596 #: build/C/man2/stat.2:228
5597 msgid "is it a regular file?"
5598 msgstr ""
5599
5600 #. type: TP
5601 #: build/C/man2/stat.2:228
5602 #, no-wrap
5603 msgid "B<S_ISDIR>(m)"
5604 msgstr ""
5605
5606 #. type: Plain text
5607 #: build/C/man2/stat.2:231
5608 msgid "directory?"
5609 msgstr ""
5610
5611 #. type: TP
5612 #: build/C/man2/stat.2:231
5613 #, no-wrap
5614 msgid "B<S_ISCHR>(m)"
5615 msgstr ""
5616
5617 #. type: Plain text
5618 #: build/C/man2/stat.2:234
5619 msgid "character device?"
5620 msgstr ""
5621
5622 #. type: TP
5623 #: build/C/man2/stat.2:234
5624 #, no-wrap
5625 msgid "B<S_ISBLK>(m)"
5626 msgstr ""
5627
5628 #. type: Plain text
5629 #: build/C/man2/stat.2:237
5630 msgid "block device?"
5631 msgstr ""
5632
5633 #. type: TP
5634 #: build/C/man2/stat.2:237
5635 #, no-wrap
5636 msgid "B<S_ISFIFO>(m)"
5637 msgstr ""
5638
5639 #. type: Plain text
5640 #: build/C/man2/stat.2:240
5641 msgid "FIFO (named pipe)?"
5642 msgstr ""
5643
5644 #. type: TP
5645 #: build/C/man2/stat.2:240
5646 #, no-wrap
5647 msgid "B<S_ISLNK>(m)"
5648 msgstr ""
5649
5650 #. type: Plain text
5651 #: build/C/man2/stat.2:243
5652 msgid "symbolic link? (Not in POSIX.1-1996.)"
5653 msgstr ""
5654
5655 #. type: TP
5656 #: build/C/man2/stat.2:243
5657 #, no-wrap
5658 msgid "B<S_ISSOCK>(m)"
5659 msgstr ""
5660
5661 #. type: Plain text
5662 #: build/C/man2/stat.2:246
5663 msgid "socket? (Not in POSIX.1-1996.)"
5664 msgstr ""
5665
5666 #. type: Plain text
5667 #: build/C/man2/stat.2:251
5668 msgid "The following flags are defined for the I<st_mode> field:"
5669 msgstr ""
5670
5671 #. type: tbl table
5672 #: build/C/man2/stat.2:254
5673 #, no-wrap
5674 msgid "S_IFMT\t0170000\tbit mask for the file type bit fields\n"
5675 msgstr ""
5676
5677 #. type: tbl table
5678 #: build/C/man2/stat.2:255
5679 #, no-wrap
5680 msgid "S_IFSOCK\t0140000\tsocket\n"
5681 msgstr ""
5682
5683 #. type: tbl table
5684 #: build/C/man2/stat.2:256
5685 #, no-wrap
5686 msgid "S_IFLNK\t0120000\tsymbolic link\n"
5687 msgstr ""
5688
5689 #. type: tbl table
5690 #: build/C/man2/stat.2:257
5691 #, no-wrap
5692 msgid "S_IFREG\t0100000\tregular file\n"
5693 msgstr ""
5694
5695 #. type: tbl table
5696 #: build/C/man2/stat.2:258
5697 #, no-wrap
5698 msgid "S_IFBLK\t0060000\tblock device\n"
5699 msgstr ""
5700
5701 #. type: tbl table
5702 #: build/C/man2/stat.2:259
5703 #, no-wrap
5704 msgid "S_IFDIR\t0040000\tdirectory\n"
5705 msgstr ""
5706
5707 #. type: tbl table
5708 #: build/C/man2/stat.2:260
5709 #, no-wrap
5710 msgid "S_IFCHR\t0020000\tcharacter device\n"
5711 msgstr ""
5712
5713 #. type: tbl table
5714 #: build/C/man2/stat.2:261
5715 #, no-wrap
5716 msgid "S_IFIFO\t0010000\tFIFO\n"
5717 msgstr ""
5718
5719 #. type: tbl table
5720 #: build/C/man2/stat.2:262
5721 #, no-wrap
5722 msgid "S_ISUID\t0004000\tset UID bit\n"
5723 msgstr ""
5724
5725 #. type: tbl table
5726 #: build/C/man2/stat.2:263
5727 #, no-wrap
5728 msgid "S_ISGID\t0002000\tset-group-ID bit (see below)\n"
5729 msgstr ""
5730
5731 #. type: tbl table
5732 #: build/C/man2/stat.2:264
5733 #, no-wrap
5734 msgid "S_ISVTX\t0001000\tsticky bit (see below)\n"
5735 msgstr ""
5736
5737 #. type: tbl table
5738 #: build/C/man2/stat.2:265
5739 #, no-wrap
5740 msgid "S_IRWXU\t00700\tmask for file owner permissions\n"
5741 msgstr ""
5742
5743 #. type: tbl table
5744 #: build/C/man2/stat.2:266
5745 #, no-wrap
5746 msgid "S_IRUSR\t00400\towner has read permission\n"
5747 msgstr ""
5748
5749 #. type: tbl table
5750 #: build/C/man2/stat.2:267
5751 #, no-wrap
5752 msgid "S_IWUSR\t00200\towner has write permission\n"
5753 msgstr ""
5754
5755 #. type: tbl table
5756 #: build/C/man2/stat.2:268
5757 #, no-wrap
5758 msgid "S_IXUSR\t00100\towner has execute permission\n"
5759 msgstr ""
5760
5761 #. type: tbl table
5762 #: build/C/man2/stat.2:269
5763 #, no-wrap
5764 msgid "S_IRWXG\t00070\tmask for group permissions\n"
5765 msgstr ""
5766
5767 #. type: tbl table
5768 #: build/C/man2/stat.2:270
5769 #, no-wrap
5770 msgid "S_IRGRP\t00040\tgroup has read permission\n"
5771 msgstr ""
5772
5773 #. type: tbl table
5774 #: build/C/man2/stat.2:271
5775 #, no-wrap
5776 msgid "S_IWGRP\t00020\tgroup has write permission\n"
5777 msgstr ""
5778
5779 #. type: tbl table
5780 #: build/C/man2/stat.2:272
5781 #, no-wrap
5782 msgid "S_IXGRP\t00010\tgroup has execute permission\n"
5783 msgstr ""
5784
5785 #. type: tbl table
5786 #: build/C/man2/stat.2:273
5787 #, no-wrap
5788 msgid "S_IRWXO\t00007\tmask for permissions for others (not in group)\n"
5789 msgstr ""
5790
5791 #. type: tbl table
5792 #: build/C/man2/stat.2:274
5793 #, no-wrap
5794 msgid "S_IROTH\t00004\tothers have read permission\n"
5795 msgstr ""
5796
5797 #. type: tbl table
5798 #: build/C/man2/stat.2:275
5799 #, no-wrap
5800 msgid "S_IWOTH\t00002\tothers have write permission\n"
5801 msgstr ""
5802
5803 #. type: tbl table
5804 #: build/C/man2/stat.2:276
5805 #, no-wrap
5806 msgid "S_IXOTH\t00001\tothers have execute permission\n"
5807 msgstr ""
5808
5809 #. type: Plain text
5810 #: build/C/man2/stat.2:293
5811 msgid ""
5812 "The set-group-ID bit (B<S_ISGID>)  has several special uses.  For a "
5813 "directory it indicates that BSD semantics is to be used for that directory: "
5814 "files created there inherit their group ID from the directory, not from the "
5815 "effective group ID of the creating process, and directories created there "
5816 "will also get the B<S_ISGID> bit set.  For a file that does not have the "
5817 "group execution bit (B<S_IXGRP>)  set, the set-group-ID bit indicates "
5818 "mandatory file/record locking."
5819 msgstr ""
5820
5821 #. type: Plain text
5822 #: build/C/man2/stat.2:300
5823 msgid ""
5824 "The sticky bit (B<S_ISVTX>)  on a directory means that a file in that "
5825 "directory can be renamed or deleted only by the owner of the file, by the "
5826 "owner of the directory, and by a privileged process."
5827 msgstr ""
5828
5829 #. type: Plain text
5830 #: build/C/man2/stat.2:313
5831 msgid ""
5832 "Search permission is denied for one of the directories in the path prefix of "
5833 "I<path>.  (See also B<path_resolution>(7).)"
5834 msgstr ""
5835
5836 #. type: Plain text
5837 #: build/C/man2/stat.2:317
5838 msgid "I<fd> is bad."
5839 msgstr ""
5840
5841 #. type: Plain text
5842 #: build/C/man2/stat.2:320
5843 msgid "Bad address."
5844 msgstr ""
5845
5846 #. type: Plain text
5847 #: build/C/man2/stat.2:323
5848 msgid "Too many symbolic links encountered while traversing the path."
5849 msgstr ""
5850
5851 #. type: Plain text
5852 #: build/C/man2/stat.2:327
5853 msgid "I<path> is too long."
5854 msgstr ""
5855
5856 #. type: Plain text
5857 #: build/C/man2/stat.2:334
5858 msgid "A component of I<path> does not exist, or I<path> is an empty string."
5859 msgstr ""
5860
5861 #. type: Plain text
5862 #: build/C/man2/stat.2:337
5863 msgid "Out of memory (i.e., kernel memory)."
5864 msgstr ""
5865
5866 #. type: Plain text
5867 #: build/C/man2/stat.2:342
5868 msgid "A component of the path prefix of I<path> is not a directory."
5869 msgstr ""
5870
5871 #. type: TP
5872 #: build/C/man2/stat.2:342 build/C/man2/statfs.2:185 build/C/man3/statvfs.3:152
5873 #, no-wrap
5874 msgid "B<EOVERFLOW>"
5875 msgstr ""
5876
5877 #. type: Plain text
5878 #: build/C/man2/stat.2:355
5879 msgid ""
5880 "(B<stat>())  I<path> refers to a file whose size cannot be represented in "
5881 "the type I<off_t>.  This can occur when an application compiled on a 32-bit "
5882 "platform without I<-D_FILE_OFFSET_BITS=64> calls B<stat>()  on a file whose "
5883 "size exceeds I<(1E<lt>E<lt>31)-1> bits."
5884 msgstr ""
5885
5886 #.  SVr4 documents additional
5887 #.  .BR fstat ()
5888 #.  error conditions EINTR, ENOLINK, and EOVERFLOW.  SVr4
5889 #.  documents additional
5890 #.  .BR stat ()
5891 #.  and
5892 #.  .BR lstat ()
5893 #.  error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
5894 #. type: Plain text
5895 #: build/C/man2/stat.2:365
5896 msgid "These system calls conform to SVr4, 4.3BSD, POSIX.1-2001."
5897 msgstr ""
5898
5899 #. type: Plain text
5900 #: build/C/man2/stat.2:379
5901 msgid ""
5902 "According to POSIX.1-2001, B<lstat>()  on a symbolic link need return valid "
5903 "information only in the I<st_size> field and the file-type component of the "
5904 "I<st_mode> field of the I<stat> structure.  POSIX.-2008 tightens the "
5905 "specification, requiring B<lstat>()  to return valid information in all "
5906 "fields except the permission bits in I<st_mode>."
5907 msgstr ""
5908
5909 #. type: Plain text
5910 #: build/C/man2/stat.2:399
5911 msgid ""
5912 "Use of the I<st_blocks> and I<st_blksize> fields may be less portable.  "
5913 "(They were introduced in BSD.  The interpretation differs between systems, "
5914 "and possibly on a single system when NFS mounts are involved.)  If you need "
5915 "to obtain the definition of the I<blkcnt_t> or I<blksize_t> types from "
5916 "I<E<lt>sys/stat.hE<gt>>, then define B<_XOPEN_SOURCE> with the value 500 or "
5917 "greater (before including I<any> header files)."
5918 msgstr ""
5919
5920 #. type: Plain text
5921 #: build/C/man2/stat.2:417
5922 msgid ""
5923 "POSIX.1-1990 did not describe the B<S_IFMT>, B<S_IFSOCK>, B<S_IFLNK>, "
5924 "B<S_IFREG>, B<S_IFBLK>, B<S_IFDIR>, B<S_IFCHR>, B<S_IFIFO>, B<S_ISVTX> "
5925 "constants, but instead demanded the use of the macros B<S_ISDIR>(), etc.  "
5926 "The B<S_IF*> constants are present in POSIX.1-2011 and later."
5927 msgstr ""
5928
5929 #. type: Plain text
5930 #: build/C/man2/stat.2:425
5931 msgid ""
5932 "The B<S_ISLNK>()  and B<S_ISSOCK>()  macros are not in POSIX.1-1996, but "
5933 "both are present in POSIX.1-2001; the former is from SVID 4, the latter from "
5934 "SUSv2."
5935 msgstr ""
5936
5937 #. type: Plain text
5938 #: build/C/man2/stat.2:435
5939 msgid ""
5940 "UNIX V7 (and later systems) had B<S_IREAD>, B<S_IWRITE>, B<S_IEXEC>, where "
5941 "POSIX prescribes the synonyms B<S_IRUSR>, B<S_IWUSR>, B<S_IXUSR>."
5942 msgstr ""
5943
5944 #. type: SS
5945 #: build/C/man2/stat.2:435
5946 #, no-wrap
5947 msgid "Other Systems"
5948 msgstr ""
5949
5950 #. type: Plain text
5951 #: build/C/man2/stat.2:437
5952 msgid "Values that have been (or are) in use on various systems:"
5953 msgstr ""
5954
5955 #. type: tbl table
5956 #: build/C/man2/stat.2:439
5957 #, no-wrap
5958 msgid "hex\tname\tls\toctal\tdescription\n"
5959 msgstr ""
5960
5961 #. type: tbl table
5962 #: build/C/man2/stat.2:440
5963 #, no-wrap
5964 msgid "f000\tS_IFMT\t\t170000\tmask for file type\n"
5965 msgstr ""
5966
5967 #. type: tbl table
5968 #: build/C/man2/stat.2:441
5969 #, no-wrap
5970 msgid "0000\t\t\t000000\tSCO out-of-service inode; BSD unknown\n"
5971 msgstr ""
5972
5973 #. type: tbl table
5974 #: build/C/man2/stat.2:442
5975 #, no-wrap
5976 msgid "\t\t\t\ttype; SVID-v2 and XPG2 have both\n"
5977 msgstr ""
5978
5979 #. type: tbl table
5980 #: build/C/man2/stat.2:443
5981 #, no-wrap
5982 msgid "\t\t\t\t0 and 0100000 for ordinary file\n"
5983 msgstr ""
5984
5985 #. type: tbl table
5986 #: build/C/man2/stat.2:444
5987 #, no-wrap
5988 msgid "1000\tS_IFIFO\tp|\t010000\tFIFO (named pipe)\n"
5989 msgstr ""
5990
5991 #. type: tbl table
5992 #: build/C/man2/stat.2:445
5993 #, no-wrap
5994 msgid "2000\tS_IFCHR\tc\t020000\tcharacter special (V7)\n"
5995 msgstr ""
5996
5997 #. type: tbl table
5998 #: build/C/man2/stat.2:446
5999 #, no-wrap
6000 msgid "3000\tS_IFMPC\t\t030000\tmultiplexed character special (V7)\n"
6001 msgstr ""
6002
6003 #. type: tbl table
6004 #: build/C/man2/stat.2:447
6005 #, no-wrap
6006 msgid "4000\tS_IFDIR\td/\t040000\tdirectory (V7)\n"
6007 msgstr ""
6008
6009 #. type: tbl table
6010 #: build/C/man2/stat.2:448
6011 #, no-wrap
6012 msgid "5000\tS_IFNAM\t\t050000\tXENIX named special file\n"
6013 msgstr ""
6014
6015 #. type: tbl table
6016 #: build/C/man2/stat.2:449
6017 #, no-wrap
6018 msgid "\t\t\t\twith two subtypes, distinguished by\n"
6019 msgstr ""
6020
6021 #. type: tbl table
6022 #: build/C/man2/stat.2:450
6023 #, no-wrap
6024 msgid "\t\t\t\tI<st_rdev> values 1, 2\n"
6025 msgstr ""
6026
6027 #. type: tbl table
6028 #: build/C/man2/stat.2:451
6029 #, no-wrap
6030 msgid "0001\tS_INSEM\ts\t000001\tXENIX semaphore subtype of IFNAM\n"
6031 msgstr ""
6032
6033 #. type: tbl table
6034 #: build/C/man2/stat.2:452
6035 #, no-wrap
6036 msgid "0002\tS_INSHD\tm\t000002\tXENIX shared data subtype of IFNAM\n"
6037 msgstr ""
6038
6039 #. type: tbl table
6040 #: build/C/man2/stat.2:453
6041 #, no-wrap
6042 msgid "6000\tS_IFBLK\tb\t060000\tblock special (V7)\n"
6043 msgstr ""
6044
6045 #. type: tbl table
6046 #: build/C/man2/stat.2:454
6047 #, no-wrap
6048 msgid "7000\tS_IFMPB\t\t070000\tmultiplexed block special (V7)\n"
6049 msgstr ""
6050
6051 #. type: tbl table
6052 #: build/C/man2/stat.2:455
6053 #, no-wrap
6054 msgid "8000\tS_IFREG\t-\t100000\tregular (V7)\n"
6055 msgstr ""
6056
6057 #. type: tbl table
6058 #: build/C/man2/stat.2:456
6059 #, no-wrap
6060 msgid "9000\tS_IFCMP\t\t110000\tVxFS compressed\n"
6061 msgstr ""
6062
6063 #. type: tbl table
6064 #: build/C/man2/stat.2:457
6065 #, no-wrap
6066 msgid "9000\tS_IFNWK\tn\t110000\tnetwork special (HP-UX)\n"
6067 msgstr ""
6068
6069 #. type: tbl table
6070 #: build/C/man2/stat.2:458
6071 #, no-wrap
6072 msgid "a000\tS_IFLNK\tl@\t120000\tsymbolic link (BSD)\n"
6073 msgstr ""
6074
6075 #. type: tbl table
6076 #: build/C/man2/stat.2:459
6077 #, no-wrap
6078 msgid "b000\tS_IFSHAD\t\t130000\tSolaris shadow inode for ACL\n"
6079 msgstr ""
6080
6081 #. type: tbl table
6082 #: build/C/man2/stat.2:460
6083 #, no-wrap
6084 msgid "\t\t\t\t(not seen by userspace)\n"
6085 msgstr ""
6086
6087 #. type: tbl table
6088 #: build/C/man2/stat.2:461
6089 #, no-wrap
6090 msgid "c000\tS_IFSOCK\ts=\t140000\tsocket (BSD; also \"S_IFSOC\" on VxFS)\n"
6091 msgstr ""
6092
6093 #. type: tbl table
6094 #: build/C/man2/stat.2:462
6095 #, no-wrap
6096 msgid "d000\tS_IFDOOR\tDE<gt>\t150000\tSolaris door\n"
6097 msgstr ""
6098
6099 #. type: tbl table
6100 #: build/C/man2/stat.2:463
6101 #, no-wrap
6102 msgid "e000\tS_IFWHT\tw%\t160000\tBSD whiteout (not used for inode)\n"
6103 msgstr ""
6104
6105 #. type: tbl table
6106 #: build/C/man2/stat.2:464
6107 #, no-wrap
6108 msgid "0200\tS_ISVTX\t\t001000\tsticky bit: save swapped text even\n"
6109 msgstr ""
6110
6111 #. type: tbl table
6112 #: build/C/man2/stat.2:465
6113 #, no-wrap
6114 msgid "\t\t\t\tafter use (V7)\n"
6115 msgstr ""
6116
6117 #. type: tbl table
6118 #: build/C/man2/stat.2:466
6119 #, no-wrap
6120 msgid "\t\t\t\treserved (SVID-v2)\n"
6121 msgstr ""
6122
6123 #. type: tbl table
6124 #: build/C/man2/stat.2:467
6125 #, no-wrap
6126 msgid "\t\t\t\tOn nondirectories: don't cache this\n"
6127 msgstr ""
6128
6129 #. type: tbl table
6130 #: build/C/man2/stat.2:468
6131 #, no-wrap
6132 msgid "\t\t\t\tfile (SunOS)\n"
6133 msgstr ""
6134
6135 #. type: tbl table
6136 #: build/C/man2/stat.2:469
6137 #, no-wrap
6138 msgid "\t\t\t\tOn directories: restricted deletion\n"
6139 msgstr ""
6140
6141 #. type: tbl table
6142 #: build/C/man2/stat.2:470
6143 #, no-wrap
6144 msgid "\t\t\t\tflag (SVID-v4.2)\n"
6145 msgstr ""
6146
6147 #. type: tbl table
6148 #: build/C/man2/stat.2:471
6149 #, no-wrap
6150 msgid "0400\tS_ISGID\t\t002000\tset-group-ID on execution (V7)\n"
6151 msgstr ""
6152
6153 #. type: tbl table
6154 #: build/C/man2/stat.2:472
6155 #, no-wrap
6156 msgid "\t\t\t\tfor directories: use BSD semantics for\n"
6157 msgstr ""
6158
6159 #. type: tbl table
6160 #: build/C/man2/stat.2:473
6161 #, no-wrap
6162 msgid "\t\t\t\tpropagation of GID\n"
6163 msgstr ""
6164
6165 #. type: tbl table
6166 #: build/C/man2/stat.2:474
6167 #, no-wrap
6168 msgid "0400\tS_ENFMT\t\t002000\tSystem V file locking enforcement (shared\n"
6169 msgstr ""
6170
6171 #. type: tbl table
6172 #: build/C/man2/stat.2:475
6173 #, no-wrap
6174 msgid "\t\t\t\twith S_ISGID)\n"
6175 msgstr ""
6176
6177 #. type: tbl table
6178 #: build/C/man2/stat.2:476
6179 #, no-wrap
6180 msgid "0800\tS_ISUID\t\t004000\tset-user-ID on execution (V7)\n"
6181 msgstr ""
6182
6183 #. type: tbl table
6184 #: build/C/man2/stat.2:477
6185 #, no-wrap
6186 msgid "0800\tS_CDF\t\t004000\tdirectory is a context dependent\n"
6187 msgstr ""
6188
6189 #. type: tbl table
6190 #: build/C/man2/stat.2:478
6191 #, no-wrap
6192 msgid "\t\t\t\tfile (HP-UX)\n"
6193 msgstr ""
6194
6195 #. type: Plain text
6196 #: build/C/man2/stat.2:482
6197 msgid "A sticky command appeared in Version 32V AT&T UNIX."
6198 msgstr ""
6199
6200 #.  As at kernel 2.6.25, XFS and JFS support nanosecond timestamps,
6201 #.  but ext2, ext3, and Reiserfs do not.
6202 #. type: Plain text
6203 #: build/C/man2/stat.2:506
6204 msgid ""
6205 "Since kernel 2.5.48, the I<stat> structure supports nanosecond resolution "
6206 "for the three file timestamp fields.  Glibc exposes the nanosecond component "
6207 "of each field using names of the form I<st_atim.tv_nsec> if the "
6208 "B<_BSD_SOURCE> or B<_SVID_SOURCE> feature test macro is defined.  These "
6209 "fields are specified in POSIX.1-2008, and, starting with version 2.12, glibc "
6210 "also exposes these field names if B<_POSIX_C_SOURCE> is defined with the "
6211 "value 200809L or greater, or B<_XOPEN_SOURCE> is defined with the value 700 "
6212 "or greater.  If none of the aforementioned macros are defined, then the "
6213 "nanosecond values are exposed with names of the form I<st_atimensec>.  On "
6214 "file systems that do not support subsecond timestamps, the nanosecond fields "
6215 "are returned with the value 0."
6216 msgstr ""
6217
6218 #. type: Plain text
6219 #: build/C/man2/stat.2:513
6220 msgid ""
6221 "On Linux, B<lstat>()  will generally not trigger automounter action, whereas "
6222 "B<stat>()  will (but see B<fstatat>(2))."
6223 msgstr ""
6224
6225 #. type: Plain text
6226 #: build/C/man2/stat.2:521
6227 msgid ""
6228 "For most files under the I</proc> directory, B<stat>()  does not return the "
6229 "file size in the I<st_size> field; instead the field is returned with the "
6230 "value 0."
6231 msgstr ""
6232
6233 #. type: SS
6234 #: build/C/man2/stat.2:521
6235 #, no-wrap
6236 msgid "Underlying kernel interface"
6237 msgstr ""
6238
6239 #
6240 #.  A note from Andries Brouwer, July 2007
6241 #
6242 #.  > Is the story not rather more complicated for some calls like
6243 #.  > stat(2)?
6244 #
6245 #.  Yes and no, mostly no. See /usr/include/sys/stat.h .
6246 #
6247 #.  The idea is here not so much that syscalls change, but that
6248 #.  the definitions of struct stat and of the types dev_t and mode_t change.
6249 #.  This means that libc (even if it does not call the kernel
6250 #.  but only calls some internal function) must know what the
6251 #.  format of dev_t or of struct stat is.
6252 #.  The communication between the application and libc goes via
6253 #.  the include file <sys/stat.h> that defines a _STAT_VER and
6254 #.  _MKNOD_VER describing the layout of the data that user space
6255 #.  uses. Each (almost each) occurrence of stat() is replaced by
6256 #.  an occurrence of xstat() where the first parameter of xstat()
6257 #.  is this version number _STAT_VER.
6258 #
6259 #.  Now, also the definitions used by the kernel change.
6260 #.  But glibc copes with this in the standard way, and the
6261 #.  struct stat as returned by the kernel is repacked into
6262 #.  the struct stat as expected by the application.
6263 #.  Thus, _STAT_VER and this setup cater for the application-libc
6264 #.  interface, rather than the libc-kernel interface.
6265 #
6266 #.  (Note that the details depend on gcc being used as c compiler.)
6267 #. type: Plain text
6268 #: build/C/man2/stat.2:573
6269 msgid ""
6270 "Over time, increases in the size of the I<stat> structure have led to three "
6271 "successive versions of B<stat>(): I<sys_stat>()  (slot I<__NR_oldstat>), "
6272 "I<sys_newstat>()  (slot I<__NR_stat>), and I<sys_stat64()> (new in kernel "
6273 "2.4; slot I<__NR_stat64>).  The glibc B<stat>()  wrapper function hides "
6274 "these details from applications, invoking the most recent version of the "
6275 "system call provided by the kernel, and repacking the returned information "
6276 "if required for old binaries.  Similar remarks apply for B<fstat>()  and "
6277 "B<lstat>()."
6278 msgstr ""
6279
6280 #. type: Plain text
6281 #: build/C/man2/stat.2:579
6282 msgid ""
6283 "The following program calls B<stat>()  and displays selected fields in the "
6284 "returned I<stat> structure."
6285 msgstr ""
6286
6287 #. type: Plain text
6288 #: build/C/man2/stat.2:586
6289 #, no-wrap
6290 msgid ""
6291 "#include E<lt>sys/types.hE<gt>\n"
6292 "#include E<lt>sys/stat.hE<gt>\n"
6293 "#include E<lt>time.hE<gt>\n"
6294 "#include E<lt>stdio.hE<gt>\n"
6295 "#include E<lt>stdlib.hE<gt>\n"
6296 msgstr ""
6297
6298 #. type: Plain text
6299 #: build/C/man2/stat.2:591
6300 #, no-wrap
6301 msgid ""
6302 "int\n"
6303 "main(int argc, char *argv[])\n"
6304 "{\n"
6305 "    struct stat sb;\n"
6306 msgstr ""
6307
6308 #. type: Plain text
6309 #: build/C/man2/stat.2:596
6310 #, no-wrap
6311 msgid ""
6312 "    if (argc != 2) {\n"
6313 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
6314 "        exit(EXIT_FAILURE);\n"
6315 "    }\n"
6316 msgstr ""
6317
6318 #. type: Plain text
6319 #: build/C/man2/stat.2:601
6320 #, no-wrap
6321 msgid ""
6322 "    if (stat(argv[1], &sb) == -1) {\n"
6323 "        perror(\"stat\");\n"
6324 "        exit(EXIT_FAILURE);\n"
6325 "    }\n"
6326 msgstr ""
6327
6328 #. type: Plain text
6329 #: build/C/man2/stat.2:603
6330 #, no-wrap
6331 msgid "    printf(\"File type:                \");\n"
6332 msgstr ""
6333
6334 #. type: Plain text
6335 #: build/C/man2/stat.2:614
6336 #, no-wrap
6337 msgid ""
6338 "    switch (sb.st_mode & S_IFMT) {\n"
6339 "    case S_IFBLK:  printf(\"block device\\en\");            break;\n"
6340 "    case S_IFCHR:  printf(\"character device\\en\");        break;\n"
6341 "    case S_IFDIR:  printf(\"directory\\en\");               break;\n"
6342 "    case S_IFIFO:  printf(\"FIFO/pipe\\en\");               break;\n"
6343 "    case S_IFLNK:  printf(\"symlink\\en\");                 break;\n"
6344 "    case S_IFREG:  printf(\"regular file\\en\");            break;\n"
6345 "    case S_IFSOCK: printf(\"socket\\en\");                  break;\n"
6346 "    default:       printf(\"unknown?\\en\");                break;\n"
6347 "    }\n"
6348 msgstr ""
6349
6350 #. type: Plain text
6351 #: build/C/man2/stat.2:616
6352 #, no-wrap
6353 msgid "    printf(\"I-node number:            %ld\\en\", (long) sb.st_ino);\n"
6354 msgstr ""
6355
6356 #. type: Plain text
6357 #: build/C/man2/stat.2:619
6358 #, no-wrap
6359 msgid ""
6360 "    printf(\"Mode:                     %lo (octal)\\en\",\n"
6361 "            (unsigned long) sb.st_mode);\n"
6362 msgstr ""
6363
6364 #. type: Plain text
6365 #: build/C/man2/stat.2:623
6366 #, no-wrap
6367 msgid ""
6368 "    printf(\"Link count:               %ld\\en\", (long) sb.st_nlink);\n"
6369 "    printf(\"Ownership:                UID=%ld   GID=%ld\\en\",\n"
6370 "            (long) sb.st_uid, (long) sb.st_gid);\n"
6371 msgstr ""
6372
6373 #. type: Plain text
6374 #: build/C/man2/stat.2:630
6375 #, no-wrap
6376 msgid ""
6377 "    printf(\"Preferred I/O block size: %ld bytes\\en\",\n"
6378 "            (long) sb.st_blksize);\n"
6379 "    printf(\"File size:                %lld bytes\\en\",\n"
6380 "            (long long) sb.st_size);\n"
6381 "    printf(\"Blocks allocated:         %lld\\en\",\n"
6382 "            (long long) sb.st_blocks);\n"
6383 msgstr ""
6384
6385 #. type: Plain text
6386 #: build/C/man2/stat.2:634
6387 #, no-wrap
6388 msgid ""
6389 "    printf(\"Last status change:       %s\", ctime(&sb.st_ctime));\n"
6390 "    printf(\"Last file access:         %s\", ctime(&sb.st_atime));\n"
6391 "    printf(\"Last file modification:   %s\", ctime(&sb.st_mtime));\n"
6392 msgstr ""
6393
6394 #. type: Plain text
6395 #: build/C/man2/stat.2:647
6396 msgid ""
6397 "B<access>(2), B<chmod>(2), B<chown>(2), B<fstatat>(2), B<readlink>(2), "
6398 "B<utime>(2), B<capabilities>(7), B<symlink>(7)"
6399 msgstr ""
6400
6401 #. type: TH
6402 #: build/C/man2/statfs.2:26
6403 #, no-wrap
6404 msgid "STATFS"
6405 msgstr ""
6406
6407 #. type: TH
6408 #: build/C/man2/statfs.2:26
6409 #, no-wrap
6410 msgid "2010-11-21"
6411 msgstr ""
6412
6413 #. type: Plain text
6414 #: build/C/man2/statfs.2:29
6415 msgid "statfs, fstatfs - get file system statistics"
6416 msgstr ""
6417
6418 #. type: Plain text
6419 #: build/C/man2/statfs.2:31
6420 msgid "B<#include E<lt>sys/vfs.hE<gt> >/* or E<lt>sys/statfs.hE<gt> */"
6421 msgstr ""
6422
6423 #. type: Plain text
6424 #: build/C/man2/statfs.2:33
6425 msgid "B<int statfs(const char *>I<path>B<, struct statfs *>I<buf>B<);>"
6426 msgstr ""
6427
6428 #. type: Plain text
6429 #: build/C/man2/statfs.2:35
6430 msgid "B<int fstatfs(int >I<fd>B<, struct statfs *>I<buf>B<);>"
6431 msgstr ""
6432
6433 #. type: Plain text
6434 #: build/C/man2/statfs.2:45
6435 msgid ""
6436 "The function B<statfs>()  returns information about a mounted file system.  "
6437 "I<path> is the pathname of any file within the mounted file system.  I<buf> "
6438 "is a pointer to a I<statfs> structure defined approximately as follows:"
6439 msgstr ""
6440
6441 #. type: Plain text
6442 #: build/C/man2/statfs.2:53
6443 #, no-wrap
6444 msgid ""
6445 "#if __WORDSIZE == 32\t\t/* System word size */\n"
6446 "# define __SWORD_TYPE           int\n"
6447 "#else /* __WORDSIZE == 64 */\n"
6448 "# define __SWORD_TYPE\t\tlong int\n"
6449 "#endif\n"
6450 msgstr ""
6451
6452 #. type: Plain text
6453 #: build/C/man2/statfs.2:68
6454 #, no-wrap
6455 msgid ""
6456 "struct statfs {\n"
6457 "    __SWORD_TYPE f_type;    /* type of file system (see below) */\n"
6458 "    __SWORD_TYPE f_bsize;   /* optimal transfer block size */\n"
6459 "    fsblkcnt_t   f_blocks;  /* total data blocks in file system */\n"
6460 "    fsblkcnt_t   f_bfree;   /* free blocks in fs */\n"
6461 "    fsblkcnt_t   f_bavail;  /* free blocks available to\n"
6462 "                               unprivileged user */\n"
6463 "    fsfilcnt_t   f_files;   /* total file nodes in file system */\n"
6464 "    fsfilcnt_t   f_ffree;   /* free file nodes in fs */\n"
6465 "    fsid_t       f_fsid;    /* file system id */\n"
6466 "    __SWORD_TYPE f_namelen; /* maximum length of filenames */\n"
6467 "    __SWORD_TYPE f_frsize;  /* fragment size (since Linux 2.6) */\n"
6468 "    __SWORD_TYPE f_spare[5];\n"
6469 "};\n"
6470 msgstr ""
6471
6472 #. type: Plain text
6473 #: build/C/man2/statfs.2:70
6474 #, no-wrap
6475 msgid "File system types:\n"
6476 msgstr ""
6477
6478 #. type: Plain text
6479 #: build/C/man2/statfs.2:116
6480 #, no-wrap
6481 msgid ""
6482 "   ADFS_SUPER_MAGIC      0xadf5\n"
6483 "   AFFS_SUPER_MAGIC      0xADFF\n"
6484 "   BEFS_SUPER_MAGIC      0x42465331\n"
6485 "   BFS_MAGIC             0x1BADFACE\n"
6486 "   CIFS_MAGIC_NUMBER     0xFF534D42\n"
6487 "   CODA_SUPER_MAGIC      0x73757245\n"
6488 "   COH_SUPER_MAGIC       0x012FF7B7\n"
6489 "   CRAMFS_MAGIC          0x28cd3d45\n"
6490 "   DEVFS_SUPER_MAGIC     0x1373\n"
6491 "   EFS_SUPER_MAGIC       0x00414A53\n"
6492 "   EXT_SUPER_MAGIC       0x137D\n"
6493 "   EXT2_OLD_SUPER_MAGIC  0xEF51\n"
6494 "   EXT2_SUPER_MAGIC      0xEF53\n"
6495 "   EXT3_SUPER_MAGIC      0xEF53\n"
6496 "   EXT4_SUPER_MAGIC      0xEF53\n"
6497 "   HFS_SUPER_MAGIC       0x4244\n"
6498 "   HPFS_SUPER_MAGIC      0xF995E849\n"
6499 "   HUGETLBFS_MAGIC       0x958458f6\n"
6500 "   ISOFS_SUPER_MAGIC     0x9660\n"
6501 "   JFFS2_SUPER_MAGIC     0x72b6\n"
6502 "   JFS_SUPER_MAGIC       0x3153464a\n"
6503 "   MINIX_SUPER_MAGIC     0x137F /* orig. minix */\n"
6504 "   MINIX_SUPER_MAGIC2    0x138F /* 30 char minix */\n"
6505 "   MINIX2_SUPER_MAGIC    0x2468 /* minix V2 */\n"
6506 "   MINIX2_SUPER_MAGIC2   0x2478 /* minix V2, 30 char names */\n"
6507 "   MSDOS_SUPER_MAGIC     0x4d44\n"
6508 "   NCP_SUPER_MAGIC       0x564c\n"
6509 "   NFS_SUPER_MAGIC       0x6969\n"
6510 "   NTFS_SB_MAGIC         0x5346544e\n"
6511 "   OPENPROM_SUPER_MAGIC  0x9fa1\n"
6512 "   PROC_SUPER_MAGIC      0x9fa0\n"
6513 "   QNX4_SUPER_MAGIC      0x002f\n"
6514 "   REISERFS_SUPER_MAGIC  0x52654973\n"
6515 "   ROMFS_MAGIC           0x7275\n"
6516 "   SMB_SUPER_MAGIC       0x517B\n"
6517 "   SYSV2_SUPER_MAGIC     0x012FF7B6\n"
6518 "   SYSV4_SUPER_MAGIC     0x012FF7B5\n"
6519 "   TMPFS_MAGIC           0x01021994\n"
6520 "   UDF_SUPER_MAGIC       0x15013346\n"
6521 "   UFS_MAGIC             0x00011954\n"
6522 "   USBDEVICE_SUPER_MAGIC 0x9fa2\n"
6523 "   VXFS_SUPER_MAGIC      0xa501FCF5\n"
6524 "   XENIX_SUPER_MAGIC     0x012FF7B4\n"
6525 "   XFS_SUPER_MAGIC       0x58465342\n"
6526 "   _XIAFS_SUPER_MAGIC    0x012FD16D\n"
6527 msgstr ""
6528
6529 #. type: Plain text
6530 #: build/C/man2/statfs.2:122
6531 msgid "Nobody knows what I<f_fsid> is supposed to contain (but see below)."
6532 msgstr ""
6533
6534 #. type: Plain text
6535 #: build/C/man2/statfs.2:127
6536 msgid ""
6537 "Fields that are undefined for a particular file system are set to 0.  "
6538 "B<fstatfs>()  returns the same information about an open file referenced by "
6539 "descriptor I<fd>."
6540 msgstr ""
6541
6542 #. type: Plain text
6543 #: build/C/man2/statfs.2:140
6544 msgid ""
6545 "(B<statfs>())  Search permission is denied for a component of the path "
6546 "prefix of I<path>.  (See also B<path_resolution>(7).)"
6547 msgstr ""
6548
6549 #. type: Plain text
6550 #: build/C/man2/statfs.2:145
6551 msgid "(B<fstatfs>())  I<fd> is not a valid open file descriptor."
6552 msgstr ""
6553
6554 #. type: Plain text
6555 #: build/C/man2/statfs.2:151
6556 msgid "I<buf> or I<path> points to an invalid address."
6557 msgstr ""
6558
6559 #. type: Plain text
6560 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6561 msgid "This call was interrupted by a signal."
6562 msgstr ""
6563
6564 #. type: TP
6565 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6566 #, no-wrap
6567 msgid "B<EIO>"
6568 msgstr ""
6569
6570 #. type: Plain text
6571 #: build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
6572 msgid "An I/O error occurred while reading from the file system."
6573 msgstr ""
6574
6575 #. type: Plain text
6576 #: build/C/man2/statfs.2:162
6577 msgid ""
6578 "(B<statfs>())  Too many symbolic links were encountered in translating "
6579 "I<path>."
6580 msgstr ""
6581
6582 #. type: Plain text
6583 #: build/C/man2/statfs.2:167
6584 msgid "(B<statfs>())  I<path> is too long."
6585 msgstr ""
6586
6587 #. type: Plain text
6588 #: build/C/man2/statfs.2:173
6589 msgid "(B<statfs>())  The file referred to by I<path> does not exist."
6590 msgstr ""
6591
6592 #. type: Plain text
6593 #: build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143
6594 msgid "Insufficient kernel memory was available."
6595 msgstr ""
6596
6597 #. type: Plain text
6598 #: build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
6599 msgid "The file system does not support this call."
6600 msgstr ""
6601
6602 #. type: Plain text
6603 #: build/C/man2/statfs.2:185
6604 msgid "(B<statfs>())  A component of the path prefix of I<path> is not a directory."
6605 msgstr ""
6606
6607 #. type: Plain text
6608 #: build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155
6609 msgid "Some values were too large to be represented in the returned struct."
6610 msgstr ""
6611
6612 #. type: Plain text
6613 #: build/C/man2/statfs.2:194
6614 msgid ""
6615 "Linux-specific.  The Linux B<statfs>()  was inspired by the 4.4BSD one (but "
6616 "they do not use the same structure)."
6617 msgstr ""
6618
6619 #. type: Plain text
6620 #: build/C/man2/statfs.2:216
6621 msgid ""
6622 "The original Linux B<statfs>()  and B<fstatfs>()  system calls were not "
6623 "designed with extremely large file sizes in mind.  Subsequently, Linux 2.6 "
6624 "added new B<statfs64>()  and B<fstatfs64>()  system calls that employ a new "
6625 "structure, I<statfs64>.  The new structure contains the same fields as the "
6626 "original I<statfs> structure, but the sizes of various fields are increased, "
6627 "to accommodate large file sizes.  The glibc B<statfs>()  and B<fstatfs>()  "
6628 "wrapper functions transparently deal with the kernel differences."
6629 msgstr ""
6630
6631 #. type: Plain text
6632 #: build/C/man2/statfs.2:221
6633 msgid ""
6634 "Some systems only have I<E<lt>sys/vfs.hE<gt>>, other systems also have "
6635 "I<E<lt>sys/statfs.hE<gt>>, where the former includes the latter.  So it "
6636 "seems including the former is the best choice."
6637 msgstr ""
6638
6639 #. type: Plain text
6640 #: build/C/man2/statfs.2:231
6641 msgid ""
6642 "LSB has deprecated the library calls B<statfs>()  and B<fstatfs>()  and "
6643 "tells us to use B<statvfs>(2)  and B<fstatvfs>(2)  instead."
6644 msgstr ""
6645
6646 #. type: SS
6647 #: build/C/man2/statfs.2:231
6648 #, no-wrap
6649 msgid "The f_fsid field"
6650 msgstr ""
6651
6652 #. type: Plain text
6653 #: build/C/man2/statfs.2:256
6654 msgid ""
6655 "Solaris, Irix and POSIX have a system call B<statvfs>(2)  that returns a "
6656 "I<struct statvfs> (defined in I<E<lt>sys/statvfs.hE<gt>>)  containing an "
6657 "I<unsigned long> I<f_fsid>.  Linux, SunOS, HP-UX, 4.4BSD have a system call "
6658 "B<statfs>()  that returns a I<struct statfs> (defined in "
6659 "I<E<lt>sys/vfs.hE<gt>>)  containing a I<fsid_t> I<f_fsid>, where I<fsid_t> "
6660 "is defined as I<struct { int val[2]; }>.  The same holds for FreeBSD, except "
6661 "that it uses the include file I<E<lt>sys/mount.hE<gt>>."
6662 msgstr ""
6663
6664 #. type: Plain text
6665 #: build/C/man2/statfs.2:269
6666 msgid ""
6667 "The general idea is that I<f_fsid> contains some random stuff such that the "
6668 "pair (I<f_fsid>,I<ino>)  uniquely determines a file.  Some operating systems "
6669 "use (a variation on) the device number, or the device number combined with "
6670 "the file-system type.  Several OSes restrict giving out the I<f_fsid> field "
6671 "to the superuser only (and zero it for unprivileged users), because this "
6672 "field is used in the filehandle of the file system when NFS-exported, and "
6673 "giving it out is a security concern."
6674 msgstr ""
6675
6676 #. type: Plain text
6677 #: build/C/man2/statfs.2:275
6678 msgid ""
6679 "Under some operating systems the I<fsid> can be used as second argument to "
6680 "the B<sysfs>(2)  system call."
6681 msgstr ""
6682
6683 #. type: Plain text
6684 #: build/C/man2/statfs.2:279
6685 msgid "B<stat>(2), B<statvfs>(2), B<path_resolution>(7)"
6686 msgstr ""
6687
6688 #. type: TH
6689 #: build/C/man3/statvfs.3:28
6690 #, no-wrap
6691 msgid "STATVFS"
6692 msgstr ""
6693
6694 #. type: TH
6695 #: build/C/man3/statvfs.3:28
6696 #, no-wrap
6697 msgid "2003-08-22"
6698 msgstr ""
6699
6700 #. type: Plain text
6701 #: build/C/man3/statvfs.3:31
6702 msgid "statvfs, fstatvfs - get file system statistics"
6703 msgstr ""
6704
6705 #. type: Plain text
6706 #: build/C/man3/statvfs.3:33
6707 msgid "B<#include E<lt>sys/statvfs.hE<gt>>"
6708 msgstr ""
6709
6710 #. type: Plain text
6711 #: build/C/man3/statvfs.3:35
6712 msgid "B<int statvfs(const char *>I<path>B<, struct statvfs *>I<buf>B<);>"
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man3/statvfs.3:37
6717 msgid "B<int fstatvfs(int >I<fd>B<, struct statvfs *>I<buf>B<);>"
6718 msgstr ""
6719
6720 #. type: Plain text
6721 #: build/C/man3/statvfs.3:47
6722 msgid ""
6723 "The function B<statvfs>()  returns information about a mounted file system.  "
6724 "I<path> is the pathname of any file within the mounted file system.  I<buf> "
6725 "is a pointer to a I<statvfs> structure defined approximately as follows:"
6726 msgstr ""
6727
6728 #. type: Plain text
6729 #: build/C/man3/statvfs.3:63
6730 #, no-wrap
6731 msgid ""
6732 "struct statvfs {\n"
6733 "    unsigned long  f_bsize;    /* file system block size */\n"
6734 "    unsigned long  f_frsize;   /* fragment size */\n"
6735 "    fsblkcnt_t     f_blocks;   /* size of fs in f_frsize units */\n"
6736 "    fsblkcnt_t     f_bfree;    /* # free blocks */\n"
6737 "    fsblkcnt_t     f_bavail;   /* # free blocks for unprivileged users */\n"
6738 "    fsfilcnt_t     f_files;    /* # inodes */\n"
6739 "    fsfilcnt_t     f_ffree;    /* # free inodes */\n"
6740 "    fsfilcnt_t     f_favail;   /* # free inodes for unprivileged users */\n"
6741 "    unsigned long  f_fsid;     /* file system ID */\n"
6742 "    unsigned long  f_flag;     /* mount flags */\n"
6743 "    unsigned long  f_namemax;  /* maximum filename length */\n"
6744 "};\n"
6745 msgstr ""
6746
6747 #. type: Plain text
6748 #: build/C/man3/statvfs.3:74
6749 msgid ""
6750 "Here the types I<fsblkcnt_t> and I<fsfilcnt_t> are defined in "
6751 "I<E<lt>sys/types.hE<gt>>.  Both used to be I<unsigned long>."
6752 msgstr ""
6753
6754 #. type: Plain text
6755 #: build/C/man3/statvfs.3:80
6756 msgid ""
6757 "The field I<f_flag> is a bit mask (of mount flags, see B<mount>(8)).  Bits "
6758 "defined by POSIX are"
6759 msgstr ""
6760
6761 #. type: TP
6762 #: build/C/man3/statvfs.3:80
6763 #, no-wrap
6764 msgid "B<ST_RDONLY>"
6765 msgstr ""
6766
6767 #. type: Plain text
6768 #: build/C/man3/statvfs.3:83
6769 msgid "Read-only file system."
6770 msgstr ""
6771
6772 #. type: TP
6773 #: build/C/man3/statvfs.3:83
6774 #, no-wrap
6775 msgid "B<ST_NOSUID>"
6776 msgstr ""
6777
6778 #. type: Plain text
6779 #: build/C/man3/statvfs.3:87
6780 msgid "Set-user-ID/set-group-ID bits are ignored by B<exec>(3)."
6781 msgstr ""
6782
6783 #. type: Plain text
6784 #: build/C/man3/statvfs.3:90
6785 msgid ""
6786 "It is unspecified whether all members of the returned struct have meaningful "
6787 "values on all file systems."
6788 msgstr ""
6789
6790 #. type: Plain text
6791 #: build/C/man3/statvfs.3:94
6792 msgid ""
6793 "B<fstatvfs>()  returns the same information about an open file referenced by "
6794 "descriptor I<fd>."
6795 msgstr ""
6796
6797 #. type: Plain text
6798 #: build/C/man3/statvfs.3:107
6799 msgid ""
6800 "(B<statvfs>())  Search permission is denied for a component of the path "
6801 "prefix of I<path>.  (See also B<path_resolution>(7).)"
6802 msgstr ""
6803
6804 #. type: Plain text
6805 #: build/C/man3/statvfs.3:112
6806 msgid "(B<fstatvfs>())  I<fd> is not a valid open file descriptor."
6807 msgstr ""
6808
6809 #. type: Plain text
6810 #: build/C/man3/statvfs.3:118
6811 msgid "I<Buf> or I<path> points to an invalid address."
6812 msgstr ""
6813
6814 #. type: Plain text
6815 #: build/C/man3/statvfs.3:129
6816 msgid ""
6817 "(B<statvfs>())  Too many symbolic links were encountered in translating "
6818 "I<path>."
6819 msgstr ""
6820
6821 #. type: Plain text
6822 #: build/C/man3/statvfs.3:134
6823 msgid "(B<statvfs>())  I<path> is too long."
6824 msgstr ""
6825
6826 #. type: Plain text
6827 #: build/C/man3/statvfs.3:140
6828 msgid "(B<statvfs>())  The file referred to by I<path> does not exist."
6829 msgstr ""
6830
6831 #. type: Plain text
6832 #: build/C/man3/statvfs.3:152
6833 msgid ""
6834 "(B<statvfs>())  A component of the path prefix of I<path> is not a "
6835 "directory."
6836 msgstr ""
6837
6838 #. type: Plain text
6839 #: build/C/man3/statvfs.3:157
6840 msgid "POSIX.1-2001."
6841 msgstr ""
6842
6843 #. type: Plain text
6844 #: build/C/man3/statvfs.3:163
6845 msgid ""
6846 "The Linux kernel has system calls B<statfs>(2)  and B<fstatfs>(2)  to "
6847 "support this library call."
6848 msgstr ""
6849
6850 #. type: Plain text
6851 #: build/C/man3/statvfs.3:165
6852 msgid "The current glibc implementations of"
6853 msgstr ""
6854
6855 #. type: Plain text
6856 #: build/C/man3/statvfs.3:170
6857 #, no-wrap
6858 msgid ""
6859 "   pathconf(path, _PC_REC_XFER_ALIGN);\n"
6860 "   pathconf(path, _PC_ALLOC_SIZE_MIN);\n"
6861 "   pathconf(path, _PC_REC_MIN_XFER_SIZE);\n"
6862 msgstr ""
6863
6864 #. type: Plain text
6865 #: build/C/man3/statvfs.3:179
6866 msgid ""
6867 "respectively use the I<f_frsize>, I<f_frsize>, and I<f_bsize> fields of the "
6868 "return value of I<statvfs(path,buf)>."
6869 msgstr ""
6870
6871 #. type: Plain text
6872 #: build/C/man3/statvfs.3:181
6873 msgid "B<statfs>(2)"
6874 msgstr ""
6875
6876 #. type: TH
6877 #: build/C/man2/sysfs.2:25
6878 #, no-wrap
6879 msgid "SYSFS"
6880 msgstr ""
6881
6882 #. type: TH
6883 #: build/C/man2/sysfs.2:25
6884 #, no-wrap
6885 msgid "2010-06-27"
6886 msgstr ""
6887
6888 #. type: Plain text
6889 #: build/C/man2/sysfs.2:28
6890 msgid "sysfs - get file system type information"
6891 msgstr ""
6892
6893 #. type: Plain text
6894 #: build/C/man2/sysfs.2:30
6895 msgid "B<int sysfs(int >I<option>B<, const char *>I<fsname>B<);>"
6896 msgstr ""
6897
6898 #. type: Plain text
6899 #: build/C/man2/sysfs.2:32
6900 msgid ""
6901 "B<int sysfs(int >I<option>B<, unsigned int >I<fs_index>B<, char "
6902 "*>I<buf>B<);>"
6903 msgstr ""
6904
6905 #. type: Plain text
6906 #: build/C/man2/sysfs.2:34
6907 msgid "B<int sysfs(int >I<option>B<);>"
6908 msgstr ""
6909
6910 #. type: Plain text
6911 #: build/C/man2/sysfs.2:43
6912 msgid ""
6913 "B<sysfs>()  returns information about the file system types currently "
6914 "present in the kernel.  The specific form of the B<sysfs>()  call and the "
6915 "information returned depends on the I<option> in effect:"
6916 msgstr ""
6917
6918 #. type: TP
6919 #: build/C/man2/sysfs.2:43
6920 #, no-wrap
6921 msgid "B<1>"
6922 msgstr ""
6923
6924 #. type: Plain text
6925 #: build/C/man2/sysfs.2:48
6926 msgid ""
6927 "Translate the file-system identifier string I<fsname> into a file-system "
6928 "type index."
6929 msgstr ""
6930
6931 #. type: TP
6932 #: build/C/man2/sysfs.2:48
6933 #, no-wrap
6934 msgid "B<2>"
6935 msgstr ""
6936
6937 #. type: Plain text
6938 #: build/C/man2/sysfs.2:59
6939 msgid ""
6940 "Translate the file-system type index I<fs_index> into a null-terminated "
6941 "file-system identifier string.  This string will be written to the buffer "
6942 "pointed to by I<buf>.  Make sure that I<buf> has enough space to accept the "
6943 "string."
6944 msgstr ""
6945
6946 #. type: TP
6947 #: build/C/man2/sysfs.2:59
6948 #, no-wrap
6949 msgid "B<3>"
6950 msgstr ""
6951
6952 #. type: Plain text
6953 #: build/C/man2/sysfs.2:63
6954 msgid ""
6955 "Return the total number of file system types currently present in the "
6956 "kernel."
6957 msgstr ""
6958
6959 #. type: Plain text
6960 #: build/C/man2/sysfs.2:65
6961 msgid "The numbering of the file-system type indexes begins with zero."
6962 msgstr ""
6963
6964 #. type: Plain text
6965 #: build/C/man2/sysfs.2:77
6966 msgid ""
6967 "On success, B<sysfs>()  returns the file-system index for option B<1>, zero "
6968 "for option B<2>, and the number of currently configured file systems for "
6969 "option B<3>.  On error, -1 is returned, and I<errno> is set appropriately."
6970 msgstr ""
6971
6972 #. type: Plain text
6973 #: build/C/man2/sysfs.2:82
6974 msgid "Either I<fsname> or I<buf> is outside your accessible address space."
6975 msgstr ""
6976
6977 #. type: Plain text
6978 #: build/C/man2/sysfs.2:90
6979 msgid ""
6980 "I<fsname> is not a valid file-system type identifier; I<fs_index> is "
6981 "out-of-bounds; I<option> is invalid."
6982 msgstr ""
6983
6984 #.  SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
6985 #.  but has no ENOSYS condition.
6986 #. type: Plain text
6987 #: build/C/man2/sysfs.2:92 build/C/man2/ustat.2:94
6988 msgid "SVr4."
6989 msgstr ""
6990
6991 #. type: Plain text
6992 #: build/C/man2/sysfs.2:99
6993 msgid ""
6994 "This System-V derived system call is obsolete; don't use it.  On systems "
6995 "with I</proc>, the same information can be obtained via "
6996 "I</proc/filesystems>; use that interface instead."
6997 msgstr ""
6998
6999 #. type: SH
7000 #: build/C/man2/sysfs.2:99
7001 #, no-wrap
7002 msgid "BUGS"
7003 msgstr ""
7004
7005 #. type: Plain text
7006 #: build/C/man2/sysfs.2:102
7007 msgid ""
7008 "There is no libc or glibc support.  There is no way to guess how large "
7009 "I<buf> should be."
7010 msgstr ""
7011
7012 #. type: TH
7013 #: build/C/man2/umount.2:30
7014 #, no-wrap
7015 msgid "UMOUNT"
7016 msgstr ""
7017
7018 #. type: TH
7019 #: build/C/man2/umount.2:30
7020 #, no-wrap
7021 msgid "2010-06-19"
7022 msgstr ""
7023
7024 #. type: Plain text
7025 #: build/C/man2/umount.2:33
7026 msgid "umount, umount2 - unmount file system"
7027 msgstr ""
7028
7029 #. type: Plain text
7030 #: build/C/man2/umount.2:38
7031 #, no-wrap
7032 msgid "B<int umount(const char *>I<target>B<);>\n"
7033 msgstr ""
7034
7035 #. type: Plain text
7036 #: build/C/man2/umount.2:40
7037 #, no-wrap
7038 msgid "B<int umount2(const char *>I<target>B<, int >I<flags>B<);>\n"
7039 msgstr ""
7040
7041 #.  Note: the kernel naming differs from the glibc naming
7042 #.  umount2 is the glibc name for what the kernel now calls umount
7043 #.  and umount is the glibc name for oldumount
7044 #. type: Plain text
7045 #: build/C/man2/umount.2:50
7046 msgid ""
7047 "B<umount>()  and B<umount2>()  remove the attachment of the (topmost) file "
7048 "system mounted on I<target>."
7049 msgstr ""
7050
7051 #. type: Plain text
7052 #: build/C/man2/umount.2:54
7053 msgid ""
7054 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
7055 "to unmount file systems."
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man2/umount.2:62
7060 msgid ""
7061 "Linux 2.1.116 added the B<umount2>()  system call, which, like B<umount>(), "
7062 "unmounts a target, but allows additional I<flags> controlling the behavior "
7063 "of the operation:"
7064 msgstr ""
7065
7066 #. type: TP
7067 #: build/C/man2/umount.2:62
7068 #, no-wrap
7069 msgid "B<MNT_FORCE> (since Linux 2.1.116)"
7070 msgstr ""
7071
7072 #. type: Plain text
7073 #: build/C/man2/umount.2:67
7074 msgid ""
7075 "Force unmount even if busy.  This can cause data loss.  (Only for NFS "
7076 "mounts.)"
7077 msgstr ""
7078
7079 #. type: TP
7080 #: build/C/man2/umount.2:67
7081 #, no-wrap
7082 msgid "B<MNT_DETACH> (since Linux 2.4.11)"
7083 msgstr ""
7084
7085 #. type: Plain text
7086 #: build/C/man2/umount.2:72
7087 msgid ""
7088 "Perform a lazy unmount: make the mount point unavailable for new accesses, "
7089 "and actually perform the unmount when the mount point ceases to be busy."
7090 msgstr ""
7091
7092 #. type: TP
7093 #: build/C/man2/umount.2:72
7094 #, no-wrap
7095 msgid "B<MNT_EXPIRE> (since Linux 2.6.8)"
7096 msgstr ""
7097
7098 #. type: Plain text
7099 #: build/C/man2/umount.2:91
7100 msgid ""
7101 "Mark the mount point as expired.  If a mount point is not currently in use, "
7102 "then an initial call to B<umount2>()  with this flag fails with the error "
7103 "B<EAGAIN>, but marks the mount point as expired.  The mount point remains "
7104 "expired as long as it isn't accessed by any process.  A second B<umount2>()  "
7105 "call specifying B<MNT_EXPIRE> unmounts an expired mount point.  This flag "
7106 "cannot be specified with either B<MNT_FORCE> or B<MNT_DETACH>."
7107 msgstr ""
7108
7109 #. type: TP
7110 #: build/C/man2/umount.2:91
7111 #, no-wrap
7112 msgid "B<UMOUNT_NOFOLLOW> (since Linux 2.6.34)"
7113 msgstr ""
7114
7115 #.  Later added to 2.6.33-stable
7116 #. type: Plain text
7117 #: build/C/man2/umount.2:99
7118 msgid ""
7119 "Don't dereference I<target> if it is a symbolic link.  This flag allows "
7120 "security problems to be avoided in set-user-ID-I<root> programs that allow "
7121 "unprivileged users to unmount file systems."
7122 msgstr ""
7123
7124 #. type: Plain text
7125 #: build/C/man2/umount.2:110
7126 msgid ""
7127 "The error values given below result from file-system type independent "
7128 "errors.  Each file system type may have its own special errors and its own "
7129 "special behavior.  See the kernel source code for details."
7130 msgstr ""
7131
7132 #. type: TP
7133 #: build/C/man2/umount.2:110
7134 #, no-wrap
7135 msgid "B<EAGAIN>"
7136 msgstr ""
7137
7138 #. type: Plain text
7139 #: build/C/man2/umount.2:117
7140 msgid ""
7141 "A call to B<umount2>()  specifying B<MNT_EXPIRE> successfully marked an "
7142 "unbusy file system as expired."
7143 msgstr ""
7144
7145 #. type: Plain text
7146 #: build/C/man2/umount.2:121
7147 msgid "I<target> could not be unmounted because it is busy."
7148 msgstr ""
7149
7150 #. type: Plain text
7151 #: build/C/man2/umount.2:125
7152 msgid "I<target> points outside the user address space."
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man2/umount.2:137
7157 msgid ""
7158 "I<target> is not a mount point.  Or, B<umount2>()  was called with "
7159 "B<MNT_EXPIRE> and either B<MNT_DETACH> or B<MNT_FORCE>."
7160 msgstr ""
7161
7162 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=10092
7163 #. type: Plain text
7164 #: build/C/man2/umount.2:156
7165 msgid ""
7166 "B<MNT_DETACH> and B<MNT_EXPIRE> are only available in glibc since version "
7167 "2.11."
7168 msgstr ""
7169
7170 #. type: Plain text
7171 #: build/C/man2/umount.2:159
7172 msgid ""
7173 "These functions are Linux-specific and should not be used in programs "
7174 "intended to be portable."
7175 msgstr ""
7176
7177 #. type: Plain text
7178 #: build/C/man2/umount.2:170
7179 msgid ""
7180 "The original B<umount>()  function was called as I<umount(device)> and would "
7181 "return B<ENOTBLK> when called with something other than a block device.  In "
7182 "Linux 0.98p4 a call I<umount(dir)> was added, in order to support anonymous "
7183 "devices.  In Linux 2.3.99-pre7 the call I<umount(device)> was removed, "
7184 "leaving only I<umount(dir)> (since now devices can be mounted in more than "
7185 "one place, so specifying the device does not suffice)."
7186 msgstr ""
7187
7188 #. type: Plain text
7189 #: build/C/man2/umount.2:175
7190 msgid "B<mount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
7191 msgstr ""
7192
7193 #. type: TH
7194 #: build/C/man2/ustat.2:28
7195 #, no-wrap
7196 msgid "USTAT"
7197 msgstr ""
7198
7199 #. type: TH
7200 #: build/C/man2/ustat.2:28
7201 #, no-wrap
7202 msgid "2003-08-04"
7203 msgstr ""
7204
7205 #. type: Plain text
7206 #: build/C/man2/ustat.2:31
7207 msgid "ustat - get file system statistics"
7208 msgstr ""
7209
7210 #. type: Plain text
7211 #: build/C/man2/ustat.2:34
7212 #, no-wrap
7213 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
7214 msgstr ""
7215
7216 #. type: Plain text
7217 #: build/C/man2/ustat.2:36
7218 #, no-wrap
7219 msgid "B<#include E<lt>unistd.hE<gt>>    /* libc[45] */\n"
7220 msgstr ""
7221
7222 #. type: Plain text
7223 #: build/C/man2/ustat.2:38
7224 #, no-wrap
7225 msgid "B<#include E<lt>ustat.hE<gt>>     /* glibc2 */\n"
7226 msgstr ""
7227
7228 #. type: Plain text
7229 #: build/C/man2/ustat.2:40
7230 #, no-wrap
7231 msgid "B<int ustat(dev_t >I<dev>B<, struct ustat *>I<ubuf>B<);>\n"
7232 msgstr ""
7233
7234 #. type: Plain text
7235 #: build/C/man2/ustat.2:50
7236 msgid ""
7237 "B<ustat>()  returns information about a mounted file system.  I<dev> is a "
7238 "device number identifying a device containing a mounted file system.  "
7239 "I<ubuf> is a pointer to a I<ustat> structure that contains the following "
7240 "members:"
7241 msgstr ""
7242
7243 #. type: Plain text
7244 #: build/C/man2/ustat.2:57
7245 #, no-wrap
7246 msgid ""
7247 "daddr_t f_tfree;      /* Total free blocks */\n"
7248 "ino_t   f_tinode;     /* Number of free inodes */\n"
7249 "char    f_fname[6];   /* Filsys name */\n"
7250 "char    f_fpack[6];   /* Filsys pack name */\n"
7251 msgstr ""
7252
7253 #. type: Plain text
7254 #: build/C/man2/ustat.2:66
7255 msgid ""
7256 "The last two fields, I<f_fname> and I<f_fpack>, are not implemented and will "
7257 "always be filled with null bytes (\\(aq\\e0\\(aq)."
7258 msgstr ""
7259
7260 #. type: Plain text
7261 #: build/C/man2/ustat.2:75
7262 msgid ""
7263 "On success, zero is returned and the I<ustat> structure pointed to by "
7264 "I<ubuf> will be filled in.  On error, -1 is returned, and I<errno> is set "
7265 "appropriately."
7266 msgstr ""
7267
7268 #. type: Plain text
7269 #: build/C/man2/ustat.2:80
7270 msgid "I<ubuf> points outside of your accessible address space."
7271 msgstr ""
7272
7273 #. type: Plain text
7274 #: build/C/man2/ustat.2:84
7275 msgid "I<dev> does not refer to a device containing a mounted file system."
7276 msgstr ""
7277
7278 #. type: Plain text
7279 #: build/C/man2/ustat.2:90
7280 msgid ""
7281 "The mounted file system referenced by I<dev> does not support this "
7282 "operation, or any version of Linux before 1.3.16."
7283 msgstr ""
7284
7285 #. type: Plain text
7286 #: build/C/man2/ustat.2:100
7287 msgid ""
7288 "B<ustat>()  is deprecated and has only been provided for compatibility.  All "
7289 "new programs should use B<statfs>(2)  instead."
7290 msgstr ""
7291
7292 #. type: SS
7293 #: build/C/man2/ustat.2:100
7294 #, no-wrap
7295 msgid "HP-UX Notes"
7296 msgstr ""
7297
7298 #.  Some software tries to use this in order to test whether the
7299 #.  underlying file system is NFS.
7300 #. type: Plain text
7301 #: build/C/man2/ustat.2:114
7302 msgid ""
7303 "The HP-UX version of the I<ustat> structure has an additional field, "
7304 "I<f_blksize>, that is unknown elsewhere.  HP-UX warns: For some file "
7305 "systems, the number of free inodes does not change.  Such file systems will "
7306 "return -1 in the field I<f_tinode>.  For some file systems, inodes are "
7307 "dynamically allocated.  Such file systems will return the current number of "
7308 "free inodes."
7309 msgstr ""
7310
7311 #. type: Plain text
7312 #: build/C/man2/ustat.2:117
7313 msgid "B<stat>(2), B<statfs>(2)"
7314 msgstr ""