OSDN Git Service

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