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.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-08-15 19:31+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"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man5/filesystems.5:26
26 #: build/C/man5/filesystems.5:26 build/C/man2/spu_create.2:25 build/C/man2/spu_run.2:26
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
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
40 msgid "Linux Programmer's Manual"
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
50 #: build/C/man5/filesystems.5:32
52 "filesystems - Linux file-system types: minix, ext, ext2, ext3, ext4, "
53 "Reiserfs, XFS, JFS, xia, msdos, umsdos, vfat, ntfs, proc, nfs, iso9660, "
54 "hpfs, sysv, smb, ncpfs"
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:72 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
64 #: build/C/man5/filesystems.5:42
66 "When, as is customary, the B<proc> file system is mounted on I</proc>, you "
67 "can find in the file I</proc/filesystems> which file systems your kernel "
68 "currently supports. If you need a currently unsupported one, insert the "
69 "corresponding module or recompile the kernel."
73 #: build/C/man5/filesystems.5:47
74 msgid "In order to use a file system, you have to I<mount> it; see B<mount>(8)."
78 #: build/C/man5/filesystems.5:49
79 msgid "Below a short description of a few of the available file systems."
83 #: build/C/man5/filesystems.5:49
89 #: build/C/man5/filesystems.5:56
91 "is the file system used in the Minix operating system, the first to run "
92 "under Linux. It has a number of shortcomings: a 64MB partition size limit, "
93 "short filenames, a single timestamp, etc. It remains useful for floppies "
98 #: build/C/man5/filesystems.5:56
104 #: build/C/man5/filesystems.5:65
106 "is an elaborate extension of the B<minix> file system. It has been "
107 "completely superseded by the second version of the extended file system "
108 "(B<ext2>) and has been removed from the kernel (in 2.1.21)."
112 #: build/C/man5/filesystems.5:65
118 #: build/C/man5/filesystems.5:75
120 "is the high performance disk file system used by Linux for fixed disks as "
121 "well as removable media. The second extended file system was designed as an "
122 "extension of the extended file system (B<ext>). B<ext2> offers the best "
123 "performance (in terms of speed and CPU usage) of the file systems supported "
128 #: build/C/man5/filesystems.5:75
134 #: build/C/man5/filesystems.5:80
136 "is a journaling version of the ext2 file system. It is easy to switch back "
137 "and forth between ext2 and ext3."
141 #: build/C/man5/filesystems.5:80
147 #: build/C/man5/filesystems.5:85
149 "is a set of upgrades to ext3 including substantial performance and "
150 "reliability enhancements, plus large increases in volume, file, and "
151 "directory size limits."
155 #: build/C/man5/filesystems.5:85
161 #: build/C/man5/filesystems.5:89
163 "is a journaling file system, designed by Hans Reiser, that was integrated "
164 "into Linux in kernel 2.4.1."
168 #: build/C/man5/filesystems.5:89
174 #: build/C/man5/filesystems.5:93
176 "is a journaling file system, developed by SGI, that was integrated into "
177 "Linux in kernel 2.4.20."
181 #: build/C/man5/filesystems.5:93
187 #: build/C/man5/filesystems.5:97
189 "is a journaling file system, developed by IBM, that was integrated into "
190 "Linux in kernel 2.4.24."
194 #: build/C/man5/filesystems.5:97
200 #: build/C/man5/filesystems.5:107
202 "was designed and implemented to be a stable, safe file system by extending "
203 "the Minix file system code. It provides the basic most requested features "
204 "without undue complexity. The B<xia> file system is no longer actively "
205 "developed or maintained. It was removed from the kernel in 2.1.21."
209 #: build/C/man5/filesystems.5:107
215 #: build/C/man5/filesystems.5:113
217 "is the file system used by DOS, Windows, and some OS/2 computers. B<msdos> "
218 "filenames can be no longer than 8 characters, followed by an optional period "
219 "and 3 character extension."
223 #: build/C/man5/filesystems.5:113
229 #: build/C/man5/filesystems.5:120
231 "is an extended DOS file system used by Linux. It adds capability for long "
232 "filenames, UID/GID, POSIX permissions, and special files (devices, named "
233 "pipes, etc.) under the DOS file system, without sacrificing compatibility "
238 #: build/C/man5/filesystems.5:120
244 #: build/C/man5/filesystems.5:124
246 "is an extended DOS file system used by Microsoft Windows95 and Windows NT. "
247 "VFAT adds the capability to use long filenames under the MSDOS file system."
251 #: build/C/man5/filesystems.5:124
257 #: build/C/man5/filesystems.5:129
259 "replaces Microsoft Window's FAT file systems (VFAT, FAT32). It has "
260 "reliability, performance, and space-utilization enhancements plus features "
261 "like ACLs, journaling, encryption, and so on."
265 #: build/C/man5/filesystems.5:129
271 #: build/C/man5/filesystems.5:137
273 "is a pseudo file system which is used as an interface to kernel data "
274 "structures rather than reading and interpreting I</dev/kmem>. In "
275 "particular, its files do not take disk space. See B<proc>(5)."
279 #: build/C/man5/filesystems.5:137
285 #: build/C/man5/filesystems.5:140
286 msgid "is a CD-ROM file system type conforming to the ISO 9660 standard."
290 #: build/C/man5/filesystems.5:141
292 msgid "B<High Sierra>"
296 #: build/C/man5/filesystems.5:148
298 "Linux supports High Sierra, the precursor to the ISO 9660 standard for "
299 "CD-ROM file systems. It is automatically recognized within the B<iso9660> "
300 "file-system support under Linux."
304 #: build/C/man5/filesystems.5:148
306 msgid "B<Rock Ridge>"
310 #: build/C/man5/filesystems.5:159
312 "Linux also supports the System Use Sharing Protocol records specified by the "
313 "Rock Ridge Interchange Protocol. They are used to further describe the "
314 "files in the B<iso9660> file system to a UNIX host, and provide information "
315 "such as long filenames, UID/GID, POSIX permissions, and devices. It is "
316 "automatically recognized within the B<iso9660> file-system support under "
321 #: build/C/man5/filesystems.5:160
327 #: build/C/man5/filesystems.5:165
329 "is the High Performance Filesystem, used in OS/2. This file system is "
330 "read-only under Linux due to the lack of available documentation."
334 #: build/C/man5/filesystems.5:165
340 #: build/C/man5/filesystems.5:169
342 "is an implementation of the SystemV/Coherent file system for Linux. It "
343 "implements all of Xenix FS, SystemV/386 FS, and Coherent FS."
347 #: build/C/man5/filesystems.5:169
353 #: build/C/man5/filesystems.5:172
354 msgid "is the network file system used to access disks located on remote computers."
358 #: build/C/man5/filesystems.5:172
364 #: build/C/man5/filesystems.5:176
366 "is a network file system that supports the SMB protocol, used by Windows for "
367 "Workgroups, Windows NT, and Lan Manager."
371 #: build/C/man5/filesystems.5:183
373 "To use B<smb> fs, you need a special mount program, which can be found in "
374 "the ksmbfs package, found at E<.UR "
375 "ftp://sunsite.unc.edu\\:/pub\\:/Linux\\:/system\\:/Filesystems\\:/smbfs> "
380 #: build/C/man5/filesystems.5:183
386 #: build/C/man5/filesystems.5:187
388 "is a network file system that supports the NCP protocol, used by Novell "
393 #: build/C/man5/filesystems.5:193
395 "To use B<ncpfs>, you need special programs, which can be found at E<.UR "
396 "ftp://linux01.gwdg.de\\:/pub\\:/ncpfs> E<.UE .>"
400 #: build/C/man5/filesystems.5:193 build/C/man3/fts.3:785 build/C/man3/ftw.3:405 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:655 build/C/man2/statfs.2:277 build/C/man3/statvfs.3:181 build/C/man2/umount.2:170 build/C/man2/ustat.2:118
406 #: build/C/man5/filesystems.5:198
407 msgid "B<proc>(5), B<fsck>(8), B<mkfs>(8), B<mount>(8)"
411 #: build/C/man5/filesystems.5:198 build/C/man3/fts.3:791 build/C/man3/ftw.3:409 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:488 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:664 build/C/man2/statfs.2:281 build/C/man3/statvfs.3:183 build/C/man2/sysfs.2:104 build/C/man2/umount.2:175 build/C/man2/ustat.2:121
417 #: build/C/man5/filesystems.5:205 build/C/man3/fts.3:798 build/C/man3/ftw.3:416 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:495 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:671 build/C/man2/statfs.2:288 build/C/man3/statvfs.3:190 build/C/man2/sysfs.2:111 build/C/man2/umount.2:182 build/C/man2/ustat.2:128
419 "This page is part of release 3.53 of the Linux I<man-pages> project. A "
420 "description of the project, and information about reporting bugs, can be "
421 "found at \\%http://www.kernel.org/doc/man-pages/."
425 #: build/C/man3/fts.3:40
431 #: build/C/man3/fts.3:40
437 #: build/C/man3/fts.3:44
439 "fts, fts_open, fts_read, fts_children, fts_set, fts_close - traverse a file "
444 #: 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
450 #: build/C/man3/fts.3:49
453 "B<#include E<lt>sys/types.hE<gt>>\n"
454 "B<#include E<lt>sys/stat.hE<gt>>\n"
455 "B<#include E<lt>fts.hE<gt>>\n"
459 #: build/C/man3/fts.3:52
462 "B<FTS *fts_open(char * const *>I<path_argv>B<, int >I<options>B<, >\n"
463 "B< int (*>I<compar>B<)(const FTSENT **, const FTSENT **));>\n"
467 #: build/C/man3/fts.3:54
469 msgid "B<FTSENT *fts_read(FTS *>I<ftsp>B<);>\n"
473 #: build/C/man3/fts.3:56
475 msgid "B<FTSENT *fts_children(FTS *>I<ftsp>B<, int >I<options>B<);>\n"
479 #: build/C/man3/fts.3:58
481 msgid "B<int fts_set(FTS *>I<ftsp>B<, FTSENT *>I<f>B<, int >I<options>B<);>\n"
485 #: build/C/man3/fts.3:60
487 msgid "B<int fts_close(FTS *>I<ftsp>B<);>\n"
491 #: build/C/man3/fts.3:87
493 "The fts functions are provided for traversing file hierarchies. A simple "
494 "overview is that the B<fts_open>() function returns a \"handle\" on a file "
495 "hierarchy, which is then supplied to the other fts functions. The function "
496 "B<fts_read>() returns a pointer to a structure describing one of the files "
497 "in the file hierarchy. The function B<fts_children>() returns a pointer to "
498 "a linked list of structures, each of which describes one of the files "
499 "contained in a directory in the hierarchy. In general, directories are "
500 "visited two distinguishable times; in preorder (before any of their "
501 "descendants are visited) and in postorder (after all of their descendants "
502 "have been visited). Files are visited once. It is possible to walk the "
503 "hierarchy \"logically\" (visiting the files that symbolic links point to) "
504 "or physically (visiting the symbolic links themselves), order the walk of "
505 "the hierarchy or prune and/or revisit portions of the hierarchy."
509 #: build/C/man3/fts.3:108
511 "Two structures are defined (and typedef'd) in the include file "
512 "I<E<lt>fts.hE<gt>>. The first is I<FTS>, the structure that represents the "
513 "file hierarchy itself. The second is I<FTSENT>, the structure that "
514 "represents a file in the file hierarchy. Normally, an I<FTSENT> structure "
515 "is returned for every file in the file hierarchy. In this manual page, "
516 "\"file\" and \"FTSENT structure\" are generally interchangeable. The "
517 "I<FTSENT> structure contains at least the following fields, which are "
518 "described in greater detail below:"
522 #: build/C/man3/fts.3:127
525 "typedef struct _ftsent {\n"
526 " unsigned short fts_info; /* flags for FTSENT structure */\n"
527 " char *fts_accpath; /* access path */\n"
528 " char *fts_path; /* root path */\n"
529 " short fts_pathlen; /* strlen(fts_path) */\n"
530 " char *fts_name; /* filename */\n"
531 " short fts_namelen; /* strlen(fts_name) */\n"
532 " short fts_level; /* depth (-1 to N) */\n"
533 " int fts_errno; /* file errno */\n"
534 " long fts_number; /* local numeric value */\n"
535 " void *fts_pointer; /* local address value */\n"
536 " struct ftsent *fts_parent; /* parent directory */\n"
537 " struct ftsent *fts_link; /* next file structure */\n"
538 " struct ftsent *fts_cycle; /* cycle structure */\n"
539 " struct stat *fts_statp; /* stat(2) information */\n"
543 #. .Bl -tag -width "fts_namelen"
545 #: build/C/man3/fts.3:132
546 msgid "These fields are defined as follows:"
550 #: build/C/man3/fts.3:132
555 #. .Bl -tag -width FTS_DEFAULT
557 #: build/C/man3/fts.3:144
559 "One of the following flags describing the returned I<FTSENT> structure and "
560 "the file it represents. With the exception of directories without errors "
561 "(B<FTS_D>), all of these entries are terminal, that is, they will not be "
562 "revisited, nor will any of their descendants be visited."
566 #: build/C/man3/fts.3:145
572 #: build/C/man3/fts.3:148
573 msgid "A directory being visited in preorder."
577 #: build/C/man3/fts.3:148
583 #: build/C/man3/fts.3:156
585 "A directory that causes a cycle in the tree. (The I<fts_cycle> field of the "
586 "I<FTSENT> structure will be filled in as well.)"
590 #: build/C/man3/fts.3:156
592 msgid "B<FTS_DEFAULT>"
596 #: build/C/man3/fts.3:164
598 "Any I<FTSENT> structure that represents a file type not explicitly described "
599 "by one of the other I<fts_info> values."
603 #: build/C/man3/fts.3:164
609 #: build/C/man3/fts.3:170
611 "A directory which cannot be read. This is an error return, and the "
612 "I<fts_errno> field will be set to indicate what caused the error."
616 #: build/C/man3/fts.3:170
622 #: build/C/man3/fts.3:180
624 "A file named \".\" or \"..\" which was not specified as a filename to "
625 "B<fts_open>() (see B<FTS_SEEDOT>)."
629 #: build/C/man3/fts.3:180
635 #: build/C/man3/fts.3:190
637 "A directory being visited in postorder. The contents of the I<FTSENT> "
638 "structure will be unchanged from when it was returned in preorder, that is, "
639 "with the I<fts_info> field set to B<FTS_D>."
643 #: build/C/man3/fts.3:190
649 #: build/C/man3/fts.3:195
651 "This is an error return, and the I<fts_errno> field will be set to indicate "
652 "what caused the error."
656 #: build/C/man3/fts.3:195
662 #: build/C/man3/fts.3:198
663 msgid "A regular file."
667 #: build/C/man3/fts.3:198
673 #: build/C/man3/fts.3:209
675 "A file for which no B<stat>(2) information was available. The contents of "
676 "the I<fts_statp> field are undefined. This is an error return, and the "
677 "I<fts_errno> field will be set to indicate what caused the error."
681 #: build/C/man3/fts.3:209
687 #: build/C/man3/fts.3:217
689 "A file for which no B<stat>(2) information was requested. The contents of "
690 "the I<fts_statp> field are undefined."
694 #: build/C/man3/fts.3:217
700 #: build/C/man3/fts.3:220
701 msgid "A symbolic link."
705 #: build/C/man3/fts.3:220
707 msgid "B<FTS_SLNONE>"
712 #: build/C/man3/fts.3:228
714 "A symbolic link with a nonexistent target. The contents of the I<fts_statp> "
715 "field reference the file characteristic information for the symbolic link "
720 #: build/C/man3/fts.3:229
722 msgid "I<fts_accpath>"
726 #: build/C/man3/fts.3:232
727 msgid "A path for accessing the file from the current directory."
731 #: build/C/man3/fts.3:232
737 #: build/C/man3/fts.3:238
739 "The path for the file relative to the root of the traversal. This path "
740 "contains the path specified to B<fts_open>() as a prefix."
744 #: build/C/man3/fts.3:238
746 msgid "I<fts_pathlen>"
750 #: build/C/man3/fts.3:242
751 msgid "The length of the string referenced by I<fts_path>."
755 #: build/C/man3/fts.3:242
761 #: build/C/man3/fts.3:245
762 msgid "The name of the file."
766 #: build/C/man3/fts.3:245
768 msgid "I<fts_namelen>"
772 #: build/C/man3/fts.3:249
773 msgid "The length of the string referenced by I<fts_name>."
777 #: build/C/man3/fts.3:249
783 #: build/C/man3/fts.3:260
785 "The depth of the traversal, numbered from -1 to N, where this file was "
786 "found. The I<FTSENT> structure representing the parent of the starting "
787 "point (or root) of the traversal is numbered -1, and the I<FTSENT> "
788 "structure for the root itself is numbered 0."
792 #: build/C/man3/fts.3:260
798 #: build/C/man3/fts.3:283
800 "Upon return of a I<FTSENT> structure from the B<fts_children>() or "
801 "B<fts_read>() functions, with its I<fts_info> field set to B<FTS_DNR>, "
802 "B<FTS_ERR> or B<FTS_NS>, the I<fts_errno> field contains the value of the "
803 "external variable I<errno> specifying the cause of the error. Otherwise, "
804 "the contents of the I<fts_errno> field are undefined."
808 #: build/C/man3/fts.3:283
810 msgid "I<fts_number>"
814 #: build/C/man3/fts.3:289
816 "This field is provided for the use of the application program and is not "
817 "modified by the fts functions. It is initialized to 0."
821 #: build/C/man3/fts.3:289
823 msgid "I<fts_pointer>"
827 #: build/C/man3/fts.3:296
829 "This field is provided for the use of the application program and is not "
830 "modified by the fts functions. It is initialized to NULL."
834 #: build/C/man3/fts.3:296
836 msgid "I<fts_parent>"
840 #: build/C/man3/fts.3:310
842 "A pointer to the I<FTSENT> structure referencing the file in the hierarchy "
843 "immediately above the current file, that is, the directory of which this "
844 "file is a member. A parent structure for the initial entry point is "
845 "provided as well, however, only the I<fts_level>, I<fts_number> and "
846 "I<fts_pointer> fields are guaranteed to be initialized."
850 #: build/C/man3/fts.3:310
856 #: build/C/man3/fts.3:321
858 "Upon return from the B<fts_children>() function, the I<fts_link> field "
859 "points to the next structure in the NULL-terminated linked list of directory "
860 "members. Otherwise, the contents of the I<fts_link> field are undefined."
864 #: build/C/man3/fts.3:321
870 #: build/C/man3/fts.3:337
872 "If a directory causes a cycle in the hierarchy (see B<FTS_DC>), either "
873 "because of a hard link between two directories, or a symbolic link pointing "
874 "to a directory, the I<fts_cycle> field of the structure will point to the "
875 "I<FTSENT> structure in the hierarchy that references the same file as the "
876 "current I<FTSENT> structure. Otherwise, the contents of the I<fts_cycle> "
877 "field are undefined."
881 #: build/C/man3/fts.3:337
888 #: build/C/man3/fts.3:343
889 msgid "A pointer to B<stat>(2) information for the file."
893 #: build/C/man3/fts.3:370
895 "A single buffer is used for all of the paths of all of the files in the file "
896 "hierarchy. Therefore, the I<fts_path> and I<fts_accpath> fields are "
897 "guaranteed to be null-terminated I<only> for the file most recently returned "
898 "by B<fts_read>(). To use these fields to reference any files represented by "
899 "other I<FTSENT> structures will require that the path buffer be modified "
900 "using the information contained in that I<FTSENT> structure's I<fts_pathlen> "
901 "field. Any such modifications should be undone before further calls to "
902 "B<fts_read>() are attempted. The I<fts_name> field is always "
907 #: build/C/man3/fts.3:370
913 #: build/C/man3/fts.3:378
915 "The B<fts_open>() function takes a pointer to an array of character "
916 "pointers naming one or more paths which make up a logical file hierarchy to "
917 "be traversed. The array must be terminated by a NULL pointer."
920 #. .Bl -tag -width "FTS_PHYSICAL"
922 #: build/C/man3/fts.3:388
924 "There are a number of options, at least one of which (either B<FTS_LOGICAL> "
925 "or B<FTS_PHYSICAL>) must be specified. The options are selected by ORing "
926 "the following values:"
930 #: build/C/man3/fts.3:388
932 msgid "B<FTS_COMFOLLOW>"
936 #: build/C/man3/fts.3:394
938 "This option causes any symbolic link specified as a root path to be followed "
939 "immediately whether or not B<FTS_LOGICAL> is also specified."
943 #: build/C/man3/fts.3:394
945 msgid "B<FTS_LOGICAL>"
949 #: build/C/man3/fts.3:413
951 "This option causes the fts routines to return I<FTSENT> structures for the "
952 "targets of symbolic links instead of the symbolic links themselves. If this "
953 "option is set, the only symbolic links for which I<FTSENT> structures are "
954 "returned to the application are those referencing nonexistent files. Either "
955 "B<FTS_LOGICAL> or B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>() "
960 #: build/C/man3/fts.3:413
962 msgid "B<FTS_NOCHDIR>"
966 #: build/C/man3/fts.3:429
968 "As a performance optimization, the fts functions change directories as they "
969 "walk the file hierarchy. This has the side-effect that an application "
970 "cannot rely on being in any particular directory during the traversal. The "
971 "B<FTS_NOCHDIR> option turns off this optimization, and the fts functions "
972 "will not change the current directory. Note that applications should not "
973 "themselves change their current directory and try to access files unless "
974 "B<FTS_NOCHDIR> is specified and absolute pathnames were provided as "
975 "arguments to B<fts_open>()."
979 #: build/C/man3/fts.3:429
981 msgid "B<FTS_NOSTAT>"
985 #: build/C/man3/fts.3:445
987 "By default, returned I<FTSENT> structures reference file characteristic "
988 "information (the I<statp> field) for each file visited. This option relaxes "
989 "that requirement as a performance optimization, allowing the fts functions "
990 "to set the I<fts_info> field to B<FTS_NSOK> and leave the contents of the "
991 "I<statp> field undefined."
995 #: build/C/man3/fts.3:445
997 msgid "B<FTS_PHYSICAL>"
1001 #: build/C/man3/fts.3:464
1003 "This option causes the fts routines to return I<FTSENT> structures for "
1004 "symbolic links themselves instead of the target files they point to. If "
1005 "this option is set, I<FTSENT> structures for all symbolic links in the "
1006 "hierarchy are returned to the application. Either B<FTS_LOGICAL> or "
1007 "B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>() function."
1011 #: build/C/man3/fts.3:464
1013 msgid "B<FTS_SEEDOT>"
1017 #: build/C/man3/fts.3:477
1019 "By default, unless they are specified as path arguments to B<fts_open>(), "
1020 "any files named \".\" or \"..\" encountered in the file hierarchy are "
1021 "ignored. This option causes the fts routines to return I<FTSENT> structures "
1026 #: build/C/man3/fts.3:477
1033 #: build/C/man3/fts.3:483
1035 "This option prevents fts from descending into directories that have a "
1036 "different device number than the file from which the descent began."
1040 #: build/C/man3/fts.3:522
1042 "The argument B<compar>() specifies a user-defined function which may be "
1043 "used to order the traversal of the hierarchy. It takes two pointers to "
1044 "pointers to I<FTSENT> structures as arguments and should return a negative "
1045 "value, zero, or a positive value to indicate if the file referenced by its "
1046 "first argument comes before, in any order with respect to, or after, the "
1047 "file referenced by its second argument. The I<fts_accpath>, I<fts_path> and "
1048 "I<fts_pathlen> fields of the I<FTSENT> structures may I<never> be used in "
1049 "this comparison. If the I<fts_info> field is set to B<FTS_NS> or "
1050 "B<FTS_NSOK>, the I<fts_statp> field may not either. If the B<compar>() "
1051 "argument is NULL, the directory traversal order is in the order listed in "
1052 "I<path_argv> for the root paths, and in the order listed in the directory "
1053 "for everything else."
1057 #: build/C/man3/fts.3:522
1063 #: build/C/man3/fts.3:535
1065 "The B<fts_read>() function returns a pointer to an I<FTSENT> structure "
1066 "describing a file in the hierarchy. Directories (that are readable and do "
1067 "not cause cycles) are visited at least twice, once in preorder and once in "
1068 "postorder. All other files are visited at least once. (Hard links between "
1069 "directories that do not cause cycles or symbolic links to symbolic links may "
1070 "cause files to be visited more than once, or directories more than twice.)"
1074 #: build/C/man3/fts.3:556
1076 "If all the members of the hierarchy have been returned, B<fts_read>() "
1077 "returns NULL and sets the external variable I<errno> to 0. If an error "
1078 "unrelated to a file in the hierarchy occurs, B<fts_read>() returns NULL and "
1079 "sets I<errno> appropriately. If an error related to a returned file occurs, "
1080 "a pointer to an I<FTSENT> structure is returned, and I<errno> may or may not "
1081 "have been set (see I<fts_info>)."
1085 #: build/C/man3/fts.3:573
1087 "The I<FTSENT> structures returned by B<fts_read>() may be overwritten after "
1088 "a call to B<fts_close>() on the same file hierarchy stream, or, after a "
1089 "call to B<fts_read>() on the same file hierarchy stream unless they "
1090 "represent a file of type directory, in which case they will not be "
1091 "overwritten until after a call to B<fts_read>() after the I<FTSENT> "
1092 "structure has been returned by the function B<fts_read>() in postorder."
1096 #: build/C/man3/fts.3:573
1098 msgid "fts_children()"
1102 #: build/C/man3/fts.3:591
1104 "The B<fts_children>() function returns a pointer to an I<FTSENT> structure "
1105 "describing the first entry in a NULL-terminated linked list of the files in "
1106 "the directory represented by the I<FTSENT> structure most recently returned "
1107 "by B<fts_read>(). The list is linked through the I<fts_link> field of the "
1108 "I<FTSENT> structure, and is ordered by the user-specified comparison "
1109 "function, if any. Repeated calls to B<fts_children>() will recreate this "
1114 #: build/C/man3/fts.3:619
1116 "As a special case, if B<fts_read>() has not yet been called for a "
1117 "hierarchy, B<fts_children>() will return a pointer to the files in the "
1118 "logical directory specified to B<fts_open>(), that is, the arguments "
1119 "specified to B<fts_open>(). Otherwise, if the I<FTSENT> structure most "
1120 "recently returned by B<fts_read>() is not a directory being visited in "
1121 "preorder, or the directory does not contain any files, B<fts_children>() "
1122 "returns NULL and sets I<errno> to zero. If an error occurs, "
1123 "B<fts_children>() returns NULL and sets I<errno> appropriately."
1127 #: build/C/man3/fts.3:630
1129 "The I<FTSENT> structures returned by B<fts_children>() may be overwritten "
1130 "after a call to B<fts_children>(), B<fts_close>() or B<fts_read>() on the "
1131 "same file hierarchy stream."
1134 #. .Bl -tag -width FTS_NAMEONLY
1136 #: build/C/man3/fts.3:634
1137 msgid "I<Option> may be set to the following value:"
1141 #: build/C/man3/fts.3:634
1143 msgid "B<FTS_NAMEONLY>"
1148 #: build/C/man3/fts.3:644
1150 "Only the names of the files are needed. The contents of all the fields in "
1151 "the returned linked list of structures are undefined with the exception of "
1152 "the I<fts_name> and I<fts_namelen> fields."
1156 #: build/C/man3/fts.3:644
1161 #. .Bl -tag -width FTS_PHYSICAL
1163 #: build/C/man3/fts.3:659
1165 "The function B<fts_set>() allows the user application to determine further "
1166 "processing for the file I<f> of the stream I<ftsp>. The B<fts_set>() "
1167 "function returns 0 on success, and -1 if an error occurs. I<Option> must be "
1168 "set to one of the following values:"
1172 #: build/C/man3/fts.3:659
1174 msgid "B<FTS_AGAIN>"
1178 #: build/C/man3/fts.3:677
1180 "Revisit the file; any file type may be revisited. The next call to "
1181 "B<fts_read>() will return the referenced file. The I<fts_stat> and "
1182 "I<fts_info> fields of the structure will be reinitialized at that time, but "
1183 "no other fields will have been changed. This option is meaningful only for "
1184 "the most recently returned file from B<fts_read>(). Normal use is for "
1185 "postorder directory visits, where it causes the directory to be revisited "
1186 "(in both preorder and postorder) as well as all of its descendants."
1190 #: build/C/man3/fts.3:677
1192 msgid "B<FTS_FOLLOW>"
1196 #: build/C/man3/fts.3:705
1198 "The referenced file must be a symbolic link. If the referenced file is the "
1199 "one most recently returned by B<fts_read>(), the next call to B<fts_read>() "
1200 "returns the file with the I<fts_info> and I<fts_statp> fields reinitialized "
1201 "to reflect the target of the symbolic link instead of the symbolic link "
1202 "itself. If the file is one of those most recently returned by "
1203 "B<fts_children>(), the I<fts_info> and I<fts_statp> fields of the structure, "
1204 "when returned by B<fts_read>(), will reflect the target of the symbolic link "
1205 "instead of the symbolic link itself. In either case, if the target of the "
1206 "symbolic link does not exist the fields of the returned structure will be "
1207 "unchanged and the I<fts_info> field will be set to B<FTS_SLNONE>."
1211 #: build/C/man3/fts.3:709
1213 "If the target of the link is a directory, the preorder return, followed by "
1214 "the return of all of its descendants, followed by a postorder return, is "
1219 #: build/C/man3/fts.3:709
1226 #: build/C/man3/fts.3:717
1228 "No descendants of this file are visited. The file may be one of those most "
1229 "recently returned by either B<fts_children>() or B<fts_read>()."
1233 #: build/C/man3/fts.3:717
1239 #: build/C/man3/fts.3:730
1241 "The B<fts_close>() function closes a file hierarchy stream I<ftsp> and "
1242 "restores the current directory to the directory from which B<fts_open>() "
1243 "was called to open I<ftsp>. The B<fts_close>() function returns 0 on "
1244 "success, and -1 if an error occurs."
1248 #: build/C/man3/fts.3:730 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:305 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
1254 #: build/C/man3/fts.3:739
1256 "The function B<fts_open>() may fail and set I<errno> for any of the errors "
1257 "specified for B<open>(2) and B<malloc>(3)."
1261 #: build/C/man3/fts.3:748
1263 "The function B<fts_close>() may fail and set I<errno> for any of the errors "
1264 "specified for B<chdir>(2) and B<close>(2)."
1268 #: build/C/man3/fts.3:762
1270 "The functions B<fts_read>() and B<fts_children>() may fail and set "
1271 "I<errno> for any of the errors specified for B<chdir>(2), B<malloc>(3), "
1272 "B<opendir>(3), B<readdir>(3) and B<stat>(2)."
1276 #: build/C/man3/fts.3:771
1278 "In addition, B<fts_children>(), B<fts_open>() and B<fts_set>() may fail "
1279 "and set I<errno> as follows:"
1283 #: build/C/man3/fts.3:771 build/C/man2/mount.2:348 build/C/man2/spu_create.2:186 build/C/man2/spu_run.2:174 build/C/man2/sysfs.2:84 build/C/man2/umount.2:125 build/C/man2/ustat.2:84
1289 #: build/C/man3/fts.3:774
1290 msgid "The options were invalid."
1294 #: build/C/man3/fts.3:774 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/umount.2:150
1300 #: build/C/man3/fts.3:776
1301 msgid "These functions are available in Linux since glibc2."
1305 #: build/C/man3/fts.3:776 build/C/man3/ftw.3:320 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:361 build/C/man2/statfs.2:190 build/C/man3/statvfs.3:157 build/C/man2/sysfs.2:92 build/C/man2/umount.2:156 build/C/man2/ustat.2:94
1307 msgid "CONFORMING TO"
1310 #. The following statement is years old, and seems no closer to
1311 #. being true -- mtk
1314 #. utility is expected to be included in a future
1318 #: build/C/man3/fts.3:785
1323 #: build/C/man3/fts.3:791
1324 msgid "B<find>(1), B<chdir>(2), B<stat>(2), B<ftw>(3), B<qsort>(3)"
1328 #: build/C/man3/ftw.3:35
1334 #: build/C/man3/ftw.3:35
1340 #: build/C/man3/ftw.3:38
1341 msgid "ftw, nftw - file tree walk"
1345 #: build/C/man3/ftw.3:41
1347 msgid "B<#include E<lt>ftw.hE<gt>>\n"
1351 #: build/C/man3/ftw.3:46
1354 "B<int ftw(const char *>I<dirpath>B<,>\n"
1355 "B< int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1357 "B< int >I<typeflag>B<),>\n"
1358 "B< int >I<nopenfd>B<);>\n"
1362 #: build/C/man3/ftw.3:49
1365 "B<#define _XOPEN_SOURCE 500> /* See feature_test_macros(7) */\n"
1366 "B<#include E<lt>ftw.hE<gt>>\n"
1370 #: build/C/man3/ftw.3:54
1373 "B<int nftw(const char *>I<dirpath>B<,>\n"
1374 "B< int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1376 "B< int >I<typeflag>B<, struct FTW *>I<ftwbuf>B<),>\n"
1377 "B< int >I<nopenfd>B<, int >I<flags>B<);>\n"
1381 #: build/C/man3/ftw.3:62
1383 "B<ftw>() walks through the directory tree that is located under the "
1384 "directory I<dirpath>, and calls I<fn>() once for each entry in the tree. By "
1385 "default, directories are handled before the files and subdirectories they "
1386 "contain (preorder traversal)."
1390 #: build/C/man3/ftw.3:75
1392 "To avoid using up all of the calling process's file descriptors, I<nopenfd> "
1393 "specifies the maximum number of directories that B<ftw>() will hold open "
1394 "simultaneously. When the search depth exceeds this, B<ftw>() will become "
1395 "slower because directories have to be closed and reopened. B<ftw>() uses "
1396 "at most one file descriptor for each level in the directory tree."
1400 #: build/C/man3/ftw.3:104
1402 "For each entry found in the tree, B<ftw>() calls I<fn>() with three "
1403 "arguments: I<fpath>, I<sb>, and I<typeflag>. I<fpath> is the pathname of "
1404 "the entry, and is expressed either as a pathname relative to the calling "
1405 "process's current working directory at the time of the call to B<ftw>(), if "
1406 "I<dirpath> was expressed as a relative pathname, or as an absolute pathname, "
1407 "if I<dirpath> was expressed as an absolute pathname. I<sb> is a pointer to "
1408 "the I<stat> structure returned by a call to B<stat>(2) for I<fpath>. "
1409 "I<typeflag> is an integer that has one of the following values:"
1413 #: build/C/man3/ftw.3:104
1419 #: build/C/man3/ftw.3:108
1420 msgid "I<fpath> is a regular file."
1424 #: build/C/man3/ftw.3:108
1430 #: build/C/man3/ftw.3:112
1431 msgid "I<fpath> is a directory."
1435 #: build/C/man3/ftw.3:112
1441 #: build/C/man3/ftw.3:116
1442 msgid "I<fpath> is a directory which can't be read."
1446 #: build/C/man3/ftw.3:116
1452 #: build/C/man3/ftw.3:123
1453 msgid "The B<stat>(2) call failed on I<fpath>, which is not a symbolic link."
1457 #: build/C/man3/ftw.3:132
1459 "If I<fpath> is a symbolic link and B<stat>(2) failed, POSIX.1-2001 states "
1460 "that it is undefined whether B<FTW_NS> or B<FTW_SL> (see below) is passed "
1465 #: build/C/man3/ftw.3:143
1467 "To stop the tree walk, I<fn>() returns a nonzero value; this value will "
1468 "become the return value of B<ftw>(). As long as I<fn>() returns 0, B<ftw>() "
1469 "will continue either until it has traversed the entire tree, in which case "
1470 "it will return zero, or until it encounters an error (such as a B<malloc>(3) "
1471 "failure), in which case it will return -1."
1475 #: build/C/man3/ftw.3:153
1477 "Because B<ftw>() uses dynamic data structures, the only safe way to exit "
1478 "out of a tree walk is to return a nonzero value from I<fn>(). To allow a "
1479 "signal to terminate the walk without causing a memory leak, have the handler "
1480 "set a global flag that is checked by I<fn>(). I<Don't> use B<longjmp>(3) "
1481 "unless the program is going to terminate."
1485 #: build/C/man3/ftw.3:153
1491 #: build/C/man3/ftw.3:160
1493 "The function B<nftw>() is the same as B<ftw>(), except that it has one "
1494 "additional argument, I<flags>, and calls I<fn>() with one more argument, "
1499 #: build/C/man3/ftw.3:163
1501 "This I<flags> argument is formed by ORing zero or more of the following "
1506 #: build/C/man3/ftw.3:163
1508 msgid "B<FTW_ACTIONRETVAL> (since glibc 2.3.3)"
1512 #: build/C/man3/ftw.3:172
1514 "If this glibc-specific flag is set, then B<nftw>() handles the return value "
1515 "from I<fn>() differently. I<fn>() should return one of the following "
1520 #: build/C/man3/ftw.3:173
1522 msgid "B<FTW_CONTINUE>"
1526 #: build/C/man3/ftw.3:178
1527 msgid "Instructs B<nftw>() to continue normally."
1531 #: build/C/man3/ftw.3:178
1533 msgid "B<FTW_SKIP_SIBLINGS>"
1536 #. If \fBFTW_DEPTH\fP
1537 #. is set, the entry's parent directory is processed next (with
1538 #. \fIflag\fP set to \fBFTW_DP\fP).
1540 #: build/C/man3/ftw.3:186
1542 "If I<fn>() returns this value, then siblings of the current entry will be "
1543 "skipped, and processing continues in the parent."
1547 #: build/C/man3/ftw.3:186
1549 msgid "B<FTW_SKIP_SUBTREE>"
1553 #: build/C/man3/ftw.3:194
1555 "If I<fn>() is called with an entry that is a directory (I<typeflag> is "
1556 "B<FTW_D>), this return value will prevent objects within that directory from "
1557 "being passed as arguments to I<fn>(). B<nftw>() continues processing with "
1558 "the next sibling of the directory."
1562 #: build/C/man3/ftw.3:194
1568 #: build/C/man3/ftw.3:200
1569 msgid "Causes B<nftw>() to return immediately with the return value B<FTW_STOP>."
1573 #: build/C/man3/ftw.3:203
1575 "Other return values could be associated with new actions in the future; "
1576 "I<fn>() should not return values other than those listed above."
1580 #: build/C/man3/ftw.3:212
1582 "The feature test macro B<_GNU_SOURCE> must be defined (before including "
1583 "I<any> header files) in order to obtain the definition of "
1584 "B<FTW_ACTIONRETVAL> from I<E<lt>ftw.hE<gt>>."
1588 #: build/C/man3/ftw.3:213
1590 msgid "B<FTW_CHDIR>"
1594 #: build/C/man3/ftw.3:220
1596 "If set, do a B<chdir>(2) to each directory before handling its contents. "
1597 "This is useful if the program needs to perform some action in the directory "
1598 "in which I<fpath> resides."
1602 #: build/C/man3/ftw.3:220
1604 msgid "B<FTW_DEPTH>"
1608 #: build/C/man3/ftw.3:226
1610 "If set, do a post-order traversal, that is, call I<fn>() for the directory "
1611 "itself I<after> handling the contents of the directory and its "
1612 "subdirectories. (By default, each directory is handled I<before> its "
1617 #: build/C/man3/ftw.3:226
1619 msgid "B<FTW_MOUNT>"
1623 #: build/C/man3/ftw.3:230
1624 msgid "If set, stay within the same file system (i.e., do not cross mount points)."
1628 #: build/C/man3/ftw.3:230
1634 #: build/C/man3/ftw.3:235
1636 "If set, do not follow symbolic links. (This is what you want.) If not set, "
1637 "symbolic links are followed, but no file is reported twice."
1641 #: build/C/man3/ftw.3:240
1643 "If B<FTW_PHYS> is not set, but B<FTW_DEPTH> is set, then the function "
1644 "I<fn>() is never called for a directory that would be a descendant of "
1649 #: build/C/man3/ftw.3:255
1651 "For each entry in the directory tree, B<nftw>() calls I<fn>() with four "
1652 "arguments. I<fpath> and I<sb> are as for B<ftw>(). I<typeflag> may receive "
1653 "any of the same values as with B<ftw>(), or any of the following values:"
1657 #: build/C/man3/ftw.3:255
1663 #: build/C/man3/ftw.3:261
1665 "I<fpath> is a directory, and B<FTW_DEPTH> was specified in I<flags>. All of "
1666 "the files and subdirectories within I<fpath> have been processed."
1670 #: build/C/man3/ftw.3:261
1675 #. To obtain the definition of this constant from
1679 #. must be defined, or
1680 #. .BR _XOPEN_SOURCE
1681 #. must be defined with a value of 500 or more.
1683 #: build/C/man3/ftw.3:272
1684 msgid "I<fpath> is a symbolic link, and B<FTW_PHYS> was set in I<flags>."
1688 #: build/C/man3/ftw.3:272
1694 #: build/C/man3/ftw.3:277
1696 "I<fpath> is a symbolic link pointing to a nonexistent file. (This occurs "
1697 "only if B<FTW_PHYS> is not set.)"
1701 #: build/C/man3/ftw.3:283
1703 "The fourth argument that B<nftw>() supplies when calling I<fn>() is a "
1704 "structure of type I<FTW>:"
1708 #: build/C/man3/ftw.3:290
1718 #: build/C/man3/ftw.3:303
1720 "I<base> is the offset of the filename (i.e., basename component) in the "
1721 "pathname given in I<fpath>. I<level> is the depth of I<fpath> in the "
1722 "directory tree, relative to the root of the tree (I<dirpath>, which has "
1727 #: build/C/man3/ftw.3:303 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:300 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
1729 msgid "RETURN VALUE"
1733 #: build/C/man3/ftw.3:305
1734 msgid "These functions return 0 on success, and -1 if an error occurs."
1738 #: build/C/man3/ftw.3:312
1740 "If I<fn>() returns nonzero, then the tree walk is terminated and the value "
1741 "returned by I<fn>() is returned as the result of B<ftw>() or B<nftw>()."
1745 #: build/C/man3/ftw.3:320
1747 "If B<nftw>() is called with the B<FTW_ACTIONRETVAL> flag, then the only "
1748 "nonzero value that should be used by I<fn>() to terminate the tree walk is "
1749 "B<FTW_STOP>, and that value is returned as the result of B<nftw>()."
1753 #: build/C/man3/ftw.3:325
1754 msgid "POSIX.1-2001, SVr4, SUSv1. POSIX.1-2008 marks B<ftw>() as obsolete."
1758 #: build/C/man3/ftw.3:325 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:499 build/C/man2/statfs.2:196 build/C/man3/statvfs.3:159 build/C/man2/sysfs.2:94 build/C/man2/umount.2:159 build/C/man2/ustat.2:98
1764 #: build/C/man3/ftw.3:329
1766 "POSIX.1-2001 note that the results are unspecified if I<fn> does not "
1767 "preserve the current working directory."
1771 #: build/C/man3/ftw.3:335
1773 "The function B<nftw>() and the use of B<FTW_SL> with B<ftw>() were "
1774 "introduced in SUSv1."
1778 #: build/C/man3/ftw.3:345
1780 "On some systems B<ftw>() will never use B<FTW_SL>, on other systems "
1781 "B<FTW_SL> occurs only for symbolic links that do not point to an existing "
1782 "file, and again on other systems B<ftw>() will use B<FTW_SL> for each "
1783 "symbolic link. For predictable control, use B<nftw>()."
1787 #: build/C/man3/ftw.3:349
1789 "Under Linux, libc4 and libc5 and glibc 2.0.6 will use B<FTW_F> for all "
1790 "objects (files, symbolic links, FIFOs, etc.) that can be stat'ed but are "
1795 #: build/C/man3/ftw.3:353
1796 msgid "The function B<nftw>() is available since glibc 2.1."
1800 #: build/C/man3/ftw.3:355
1801 msgid "B<FTW_ACTIONRETVAL> is glibc-specific."
1805 #: build/C/man3/ftw.3:355 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:590
1811 #: build/C/man3/ftw.3:364
1813 "The following program traverses the directory tree under the path named in "
1814 "its first command-line argument, or under the current directory if no "
1815 "argument is supplied. It displays various information about each file. The "
1816 "second command-line argument can be used to specify characters that control "
1817 "the value assigned to the I<flags> argument when calling B<nftw>()."
1821 #: build/C/man3/ftw.3:372
1824 "#define _XOPEN_SOURCE 500\n"
1825 "#include E<lt>ftw.hE<gt>\n"
1826 "#include E<lt>stdio.hE<gt>\n"
1827 "#include E<lt>stdlib.hE<gt>\n"
1828 "#include E<lt>string.hE<gt>\n"
1829 "#include E<lt>stdint.hE<gt>\n"
1833 #: build/C/man3/ftw.3:386
1837 "display_info(const char *fpath, const struct stat *sb,\n"
1838 " int tflag, struct FTW *ftwbuf)\n"
1840 " printf(\"%-3s %2d %7jd %-40s %d %s\\en\",\n"
1841 " (tflag == FTW_D) ? \"d\" : (tflag == FTW_DNR) ? \"dnr\" :\n"
1842 " (tflag == FTW_DP) ? \"dp\" : (tflag == FTW_F) ? \"f\" :\n"
1843 " (tflag == FTW_NS) ? \"ns\" : (tflag == FTW_SL) ? \"sl\" :\n"
1844 " (tflag == FTW_SLN) ? \"sln\" : \"???\",\n"
1845 " ftwbuf-E<gt>level, (intmax_t) sb-E<gt>st_size,\n"
1846 " fpath, ftwbuf-E<gt>base, fpath + ftwbuf-E<gt>base);\n"
1847 " return 0; /* To tell nftw() to continue */\n"
1852 #: build/C/man3/ftw.3:391
1856 "main(int argc, char *argv[])\n"
1862 #: build/C/man3/ftw.3:396
1865 " if (argc E<gt> 2 && strchr(argv[2], \\(aqd\\(aq) != NULL)\n"
1866 " flags |= FTW_DEPTH;\n"
1867 " if (argc E<gt> 2 && strchr(argv[2], \\(aqp\\(aq) != NULL)\n"
1868 " flags |= FTW_PHYS;\n"
1872 #: build/C/man3/ftw.3:404
1875 " if (nftw((argc E<lt> 2) ? \".\" : argv[1], display_info, 20, flags)\n"
1877 " perror(\"nftw\");\n"
1878 " exit(EXIT_FAILURE);\n"
1880 " exit(EXIT_SUCCESS);\n"
1885 #: build/C/man3/ftw.3:409
1886 msgid "B<stat>(2), B<fts>(3), B<readdir>(3)"
1890 #: build/C/man3/getfsent.3:27
1896 #: build/C/man3/getfsent.3:27
1902 #: build/C/man3/getfsent.3:27
1908 #: build/C/man3/getfsent.3:30
1909 msgid "getfsent, getfsspec, getfsfile, setfsent, endfsent - handle fstab entries"
1913 #: build/C/man3/getfsent.3:32
1914 msgid "B<#include E<lt>fstab.hE<gt>>"
1918 #: build/C/man3/getfsent.3:34
1919 msgid "B<void endfsent(void);>"
1923 #: build/C/man3/getfsent.3:36
1924 msgid "B<struct fstab *getfsent(void);>"
1928 #: build/C/man3/getfsent.3:38
1929 msgid "B<struct fstab *getfsfile(const char *>I<mount_point>B<);>"
1933 #: build/C/man3/getfsent.3:40
1934 msgid "B<struct fstab *getfsspec(const char *>I<special_file>B<);>"
1938 #: build/C/man3/getfsent.3:42
1939 msgid "B<int setfsent(void);>"
1943 #: build/C/man3/getfsent.3:48
1945 "These functions read from the file I</etc/fstab>. The I<struct fstab> is "
1950 #: build/C/man3/getfsent.3:60
1954 " char *fs_spec; /* block device name */\n"
1955 " char *fs_file; /* mount point */\n"
1956 " char *fs_vfstype; /* file-sysem type */\n"
1957 " char *fs_mntops; /* mount options */\n"
1958 " const char *fs_type; /* rw/rq/ro/sw/xx option */\n"
1959 " int fs_freq; /* dump frequency, in days */\n"
1960 " int fs_passno; /* pass number on parallel dump */\n"
1965 #: build/C/man3/getfsent.3:68
1967 "Here the field I<fs_type> contains (on a *BSD system) one of the five "
1968 "strings \"rw\", \"rq\", \"ro\", \"sw\", \"xx\" (read-write, read-write with "
1969 "quota, read-only, swap, ignore)."
1973 #: build/C/man3/getfsent.3:72
1975 "The function B<setfsent>() opens the file when required and positions it at "
1980 #: build/C/man3/getfsent.3:77
1982 "The function B<getfsent>() parses the next line from the file. (After "
1983 "opening it when required.)"
1987 #: build/C/man3/getfsent.3:81
1988 msgid "The function B<endfsent>() closes the file when required."
1992 #: build/C/man3/getfsent.3:90
1994 "The function B<getfsspec>() searches the file from the start and returns "
1995 "the first entry found for which the I<fs_spec> field matches the "
1996 "I<special_file> argument."
2000 #: build/C/man3/getfsent.3:99
2002 "The function B<getfsfile>() searches the file from the start and returns "
2003 "the first entry found for which the I<fs_file> field matches the "
2004 "I<mount_point> argument."
2010 #. function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
2012 #: build/C/man3/getfsent.3:115
2014 "Upon success, the functions B<getfsent>(), B<getfsfile>(), and "
2015 "B<getfsspec>() return a pointer to a I<struct fstab>, while B<setfsent>() "
2016 "returns 1. Upon failure or end-of-file, these functions return NULL and 0, "
2021 #: build/C/man3/getfsent.3:127
2023 "These functions are not in POSIX.1-2001. Several operating systems have "
2024 "them, e.g., *BSD, SunOS, Digital UNIX, AIX (which also has a "
2025 "B<getfstype>()). HP-UX has functions of the same names, that however use a "
2026 "I<struct checklist> instead of a I<struct fstab>, and calls these functions "
2027 "obsolete, superseded by B<getmntent>(3)."
2031 #: build/C/man3/getfsent.3:129
2032 msgid "These functions are not thread-safe."
2036 #: build/C/man3/getfsent.3:139
2038 "Since Linux allows mounting a block special device in several places, and "
2039 "since several devices can have the same mount point, where the last device "
2040 "with a given mount point is the interesting one, while B<getfsfile>() and "
2041 "B<getfsspec>() only return the first occurrence, these two functions are "
2042 "not suitable for use under Linux."
2046 #: build/C/man3/getfsent.3:142
2047 msgid "B<getmntent>(3), B<fstab>(5)"
2051 #: build/C/man3/getmntent.3:32
2057 #: build/C/man3/getmntent.3:32
2063 #: build/C/man3/getmntent.3:36
2065 "getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r - get "
2066 "file system descriptor file entry"
2070 #: build/C/man3/getmntent.3:40
2073 "B<#include E<lt>stdio.hE<gt>>\n"
2074 "B<#include E<lt>mntent.hE<gt>>\n"
2078 #: build/C/man3/getmntent.3:42
2080 msgid "B<FILE *setmntent(const char *>I<filename>B<, const char *>I<type>B<);>\n"
2084 #: build/C/man3/getmntent.3:44
2086 msgid "B<struct mntent *getmntent(FILE *>I<fp>B<);>\n"
2090 #: build/C/man3/getmntent.3:46
2092 msgid "B<int addmntent(FILE *>I<fp>B<, const struct mntent *>I<mnt>B<);>\n"
2096 #: build/C/man3/getmntent.3:48
2098 msgid "B<int endmntent(FILE *>I<fp>B<);>\n"
2102 #: build/C/man3/getmntent.3:50
2104 msgid "B<char *hasmntopt(const struct mntent *>I<mnt>B<, const char *>I<opt>B<);>\n"
2108 #: build/C/man3/getmntent.3:53
2111 "/* GNU extension */\n"
2112 "B<#include E<lt>mntent.hE<gt>>\n"
2116 #: build/C/man3/getmntent.3:56
2119 "B<struct mntent *getmntent_r(FILE *>I<fp>B<, struct mntent *>I<mntbuf>B<,>\n"
2120 "B< char *>I<buf>B<, int >I<buflen>B<);>\n"
2124 #: build/C/man3/getmntent.3:61 build/C/man2/stat.2:59
2125 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2129 #: build/C/man3/getmntent.3:65
2130 msgid "B<getmntent_r>(): _BSD_SOURCE || _SVID_SOURCE"
2134 #: build/C/man3/getmntent.3:70
2136 "These routines are used to access the file system description file "
2137 "I</etc/fstab> and the mounted file system description file I</etc/mtab>."
2141 #: build/C/man3/getmntent.3:84
2143 "The B<setmntent>() function opens the file system description file "
2144 "I<filename> and returns a file pointer which can be used by B<getmntent>(). "
2145 "The argument I<type> is the type of access required and can take the same "
2146 "values as the I<mode> argument of B<fopen>(3)."
2150 #: build/C/man3/getmntent.3:96
2152 "The B<getmntent>() function reads the next line from the file system "
2153 "description file I<fp> and returns a pointer to a structure containing the "
2154 "broken out fields from a line in the file. The pointer points to a static "
2155 "area of memory which is overwritten by subsequent calls to B<getmntent>()."
2159 #: build/C/man3/getmntent.3:106
2161 "The B<addmntent>() function adds the I<mntent> structure I<mnt> to the end "
2162 "of the open file I<fp>."
2166 #: build/C/man3/getmntent.3:111
2167 msgid "The B<endmntent>() function closes the file system description file I<fp>."
2171 #: build/C/man3/getmntent.3:128
2173 "The B<hasmntopt>() function scans the I<mnt_opts> field (see below) of the "
2174 "I<mntent> structure I<mnt> for a substring that matches I<opt>. See "
2175 "I<E<lt>mntent.hE<gt>> and B<mount>(8) for valid mount options."
2179 #: build/C/man3/getmntent.3:142
2181 "The reentrant B<getmntent_r>() function is similar to B<getmntent>(), but "
2182 "stores the I<struct mount> in the provided I<*mntbuf> and stores the strings "
2183 "pointed to by the entries in that struct in the provided array I<buf> of "
2188 #: build/C/man3/getmntent.3:148
2189 msgid "The I<mntent> structure is defined in I<E<lt>mntent.hE<gt>> as follows:"
2193 #: build/C/man3/getmntent.3:159
2197 " char *mnt_fsname; /* name of mounted file system */\n"
2198 " char *mnt_dir; /* file system path prefix */\n"
2199 " char *mnt_type; /* mount type (see mntent.h) */\n"
2200 " char *mnt_opts; /* mount options (see mntent.h) */\n"
2201 " int mnt_freq; /* dump frequency in days */\n"
2202 " int mnt_passno; /* pass number on parallel fsck */\n"
2207 #: build/C/man3/getmntent.3:174
2209 "Since fields in the mtab and fstab files are separated by whitespace, octal "
2210 "escapes are used to represent the four characters space (\\e040), tab "
2211 "(\\e011), newline (\\e012) and backslash (\\e134) in those files when they "
2212 "occur in one of the four strings in a I<mntent> structure. The routines "
2213 "B<addmntent>() and B<getmntent>() will convert from string representation "
2214 "to escaped representation and back."
2218 #: build/C/man3/getmntent.3:183
2220 "The B<getmntent>() and B<getmntent_r>() functions return a pointer to the "
2221 "I<mntent> structure or NULL on failure."
2225 #: build/C/man3/getmntent.3:187
2226 msgid "The B<addmntent>() function returns 0 on success and 1 on failure."
2230 #: build/C/man3/getmntent.3:191
2231 msgid "The B<endmntent>() function always returns 1."
2235 #: build/C/man3/getmntent.3:196
2237 "The B<hasmntopt>() function returns the address of the substring if a match "
2238 "is found and NULL otherwise."
2242 #: build/C/man3/getmntent.3:196 build/C/man2/spu_create.2:240
2248 #: build/C/man3/getmntent.3:200
2251 "/etc/fstab file system description file\n"
2252 "/etc/mtab mounted file system description file\n"
2256 #: build/C/man3/getmntent.3:207
2258 "The nonreentrant functions are from SunOS 4.1.3. A routine B<getmntent_r>() "
2259 "was introduced in HP-UX 10, but it returns an int. The prototype shown "
2260 "above is glibc-only."
2264 #: build/C/man3/getmntent.3:219
2266 "System V also has a B<getmntent>() function but the calling sequence "
2267 "differs, and the returned structure is different. Under System V "
2268 "I</etc/mnttab> is used. 4.4BSD and Digital UNIX have a routine "
2269 "B<getmntinfo>(), a wrapper around the system call B<getfsstat>()."
2273 #: build/C/man3/getmntent.3:223
2274 msgid "B<fopen>(3), B<fstab>(5), B<mount>(8)"
2278 #: build/C/man2/getxattr.2:25
2284 #: build/C/man2/getxattr.2:25 build/C/man2/removexattr.2:25 build/C/man2/setxattr.2:25
2290 #: build/C/man2/getxattr.2:28
2291 msgid "getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value"
2295 #: build/C/man2/getxattr.2:33 build/C/man2/listxattr.2:33 build/C/man2/removexattr.2:33 build/C/man2/setxattr.2:33
2298 "B<#include E<lt>sys/types.hE<gt>>\n"
2299 "B<#include E<lt>attr/xattr.hE<gt>>\n"
2303 #: build/C/man2/getxattr.2:40
2306 "B<ssize_t getxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2307 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2308 "B<ssize_t lgetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2309 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2310 "B<ssize_t fgetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
2311 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2315 #: build/C/man2/getxattr.2:53 build/C/man2/setxattr.2:53
2317 "Extended attributes are I<name>:I<value> pairs associated with inodes "
2318 "(files, directories, symbolic links, etc.). They are extensions to the "
2319 "normal attributes which are associated with all inodes in the system (i.e., "
2320 "the B<stat>(2) data). A complete overview of extended attributes concepts "
2321 "can be found in B<attr>(5)."
2325 #: build/C/man2/getxattr.2:65
2327 "B<getxattr>() retrieves the I<value> of the extended attribute identified "
2328 "by I<name> and associated with the given I<path> in the file system. The "
2329 "length of the attribute I<value> is returned."
2333 #: build/C/man2/getxattr.2:71
2335 "B<lgetxattr>() is identical to B<getxattr>(), except in the case of a "
2336 "symbolic link, where the link itself is interrogated, not the file that it "
2341 #: build/C/man2/getxattr.2:81
2343 "B<fgetxattr>() is identical to B<getxattr>(), only the open file referred "
2344 "to by I<fd> (as returned by B<open>(2)) is interrogated in place of "
2349 #: build/C/man2/getxattr.2:89
2351 "An extended attribute I<name> is a simple null-terminated string. The name "
2352 "includes a namespace prefix; there may be several, disjoint namespaces "
2353 "associated with an individual inode. The value of an extended attribute is "
2354 "a chunk of arbitrary textual or binary data of specified length."
2358 #: build/C/man2/getxattr.2:96
2360 "An empty buffer of I<size> zero can be passed into these calls to return the "
2361 "current size of the named extended attribute, which can be used to estimate "
2362 "the size of a buffer which is sufficiently large to hold the value "
2363 "associated with the extended attribute."
2367 #: build/C/man2/getxattr.2:100
2369 "The interface is designed to allow guessing of initial buffer sizes, and to "
2370 "enlarge buffers when the return value indicates that the buffer provided was "
2375 #: build/C/man2/getxattr.2:106
2377 "On success, a positive number is returned indicating the size of the "
2378 "extended attribute value. On failure, -1 is returned and I<errno> is set "
2383 #: build/C/man2/getxattr.2:107 build/C/man2/removexattr.2:84 build/C/man2/setxattr.2:119
2389 #: build/C/man2/getxattr.2:116
2391 "The named attribute does not exist, or the process has no access to this "
2392 "attribute. (B<ENOATTR> is defined to be a synonym for B<ENODATA> in "
2393 "I<E<lt>attr/xattr.hE<gt>>.)"
2397 #: build/C/man2/getxattr.2:116 build/C/man2/listxattr.2:128 build/C/man2/removexattr.2:92 build/C/man2/setxattr.2:131
2403 #: build/C/man2/getxattr.2:119 build/C/man2/listxattr.2:131 build/C/man2/removexattr.2:95
2404 msgid "Extended attributes are not supported by the file system, or are disabled."
2408 #: build/C/man2/getxattr.2:119 build/C/man2/listxattr.2:131
2414 #: build/C/man2/getxattr.2:126
2415 msgid "The I<size> of the I<value> buffer is too small to hold the result."
2419 #: build/C/man2/getxattr.2:130 build/C/man2/listxattr.2:142 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:141
2420 msgid "In addition, the errors documented in B<stat>(2) can also occur."
2424 #: build/C/man2/getxattr.2:133 build/C/man2/listxattr.2:145 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:144
2426 "These system calls have been available on Linux since kernel 2.4; glibc "
2427 "support is provided since version 2.3."
2431 #. Andreas Gruenbacher,
2432 #. .RI < a.gruenbacher@computer.org >
2433 #. and the SGI XFS development team,
2434 #. .RI < linux-xfs@oss.sgi.com >.
2435 #. Please send any bug reports or comments to these addresses.
2437 #: build/C/man2/getxattr.2:141 build/C/man2/listxattr.2:153 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:152
2438 msgid "These system calls are Linux-specific."
2442 #: build/C/man2/getxattr.2:151
2444 "B<getfattr>(1), B<setfattr>(1), B<listxattr>(2), B<open>(2), "
2445 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2449 #: build/C/man2/listxattr.2:25
2455 #: build/C/man2/listxattr.2:25
2461 #: build/C/man2/listxattr.2:28
2462 msgid "listxattr, llistxattr, flistxattr - list extended attribute names"
2466 #: build/C/man2/listxattr.2:39
2469 "B<ssize_t listxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2471 "B<ssize_t llistxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2473 "B<ssize_t flistxattr(int >I<fd>B<, char\\ *>I<list>B<, size_t "
2478 #: build/C/man2/listxattr.2:50
2480 "Extended attributes are name:value pairs associated with inodes (files, "
2481 "directories, symbolic links, etc.). They are extensions to the normal "
2482 "attributes which are associated with all inodes in the system (i.e., the "
2483 "B<stat>(2) data). A complete overview of extended attributes concepts can "
2484 "be found in B<attr>(5)."
2488 #: build/C/man2/listxattr.2:66
2490 "B<listxattr>() retrieves the list of extended attribute names associated "
2491 "with the given I<path> in the file system. The retrieved list is placed in "
2492 "I<list>, a caller-allocated buffer whose size (in bytes) is specified in the "
2493 "argument I<size>. The list is the set of (null-terminated) names, one after "
2494 "the other. Names of extended attributes to which the calling process does "
2495 "not have access may be omitted from the list. The length of the attribute "
2496 "name I<list> is returned."
2500 #: build/C/man2/listxattr.2:73
2502 "B<llistxattr>() is identical to B<listxattr>(), except in the case of a "
2503 "symbolic link, where the list of names of extended attributes associated "
2504 "with the link itself is retrieved, not the file that it refers to."
2508 #: build/C/man2/listxattr.2:83
2510 "B<flistxattr>() is identical to B<listxattr>(), only the open file referred "
2511 "to by I<fd> (as returned by B<open>(2)) is interrogated in place of "
2516 #: build/C/man2/listxattr.2:89
2518 "A single extended attribute I<name> is a simple null-terminated string. The "
2519 "name includes a namespace prefix; there may be several, disjoint namespaces "
2520 "associated with an individual inode."
2524 #: build/C/man2/listxattr.2:95
2526 "An empty buffer of I<size> zero can be passed into these calls to return the "
2527 "current size of the list of extended attribute names, which can be used to "
2528 "estimate the size of a buffer which is sufficiently large to hold the list "
2533 #: build/C/man2/listxattr.2:95
2539 #: build/C/man2/listxattr.2:100
2541 "The I<list> of names is returned as an unordered array of null-terminated "
2542 "character strings (attribute names are separated by null bytes "
2543 "(\\(aq\\e0\\(aq)), like this:"
2547 #: build/C/man2/listxattr.2:105
2549 msgid "user.name1\\e0system.name1\\e0user.name2\\e0\n"
2553 #: build/C/man2/listxattr.2:113
2555 "Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using "
2556 "extended attributes, might return a I<list> like this:"
2560 #: build/C/man2/listxattr.2:118
2562 msgid "system.posix_acl_access\\e0system.posix_acl_default\\e0\n"
2566 #: build/C/man2/listxattr.2:127
2568 "On success, a nonnegative number is returned indicating the size of the "
2569 "extended attribute name list. On failure, -1 is returned and I<errno> is "
2570 "set appropriately."
2574 #: build/C/man2/listxattr.2:138
2575 msgid "The I<size> of the I<list> buffer is too small to hold the result."
2579 #: build/C/man2/listxattr.2:163
2581 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<open>(2), "
2582 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2586 #: build/C/man2/mount.2:40
2592 #: build/C/man2/mount.2:40
2598 #: build/C/man2/mount.2:43
2599 msgid "mount - mount file system"
2603 #: build/C/man2/mount.2:46 build/C/man2/umount.2:36
2605 msgid "B<#include E<lt>sys/mount.hE<gt>>\n"
2609 #: build/C/man2/mount.2:50
2612 "B<int mount(const char *>I<source>B<, const char *>I<target>B<,>\n"
2613 "B< const char *>I<filesystemtype>B<, unsigned long "
2614 ">I<mountflags>B<,>\n"
2615 "B< const void *>I<data>B<);>\n"
2619 #: build/C/man2/mount.2:58
2621 "B<mount>() attaches the file system specified by I<source> (which is often "
2622 "a device name, but can also be a directory name or a dummy) to the directory "
2623 "specified by I<target>."
2627 #: build/C/man2/mount.2:62
2629 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
2630 "to mount file systems."
2633 #. Multiple mounts on same mount point: since 2.3.99pre7.
2635 #: build/C/man2/mount.2:67
2637 "Since Linux 2.4 a single file system can be visible at multiple mount "
2638 "points, and multiple mounts can be stacked on the same mount point."
2642 #: build/C/man2/mount.2:76
2644 "Values for the I<filesystemtype> argument supported by the kernel are listed "
2645 "in I</proc/filesystems> (e.g., \"minix\", \"ext2\", \"ext3\", \"jfs\", "
2646 "\"xfs\", \"reiserfs\", \"msdos\", \"proc\", \"nfs\", \"iso9660\"). Further "
2647 "types may become available when the appropriate modules are loaded."
2650 #. (as defined in \fI<linux/fs.h>\fP for libc4 and libc5
2651 #. and in \fI<sys/mount.h>\fP for glibc2)
2652 #. FIXME 2.6.15 added flags for "shared subtree" functionality:
2653 #. MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
2656 #. All mounts are private by default. Previously shared mouns
2657 #. can be remarked PRIVATE.
2659 #. Mount points that are marked SHARED propagate mount events
2660 #. to one another after bing cloned.
2662 #. A previously shared mount point can be marked SALVE, meaning
2663 #. it receives propagated events, but does not propagate events.
2665 #. mounts cannot be bound into other places, and will not be
2666 #. propagated into new subtrees
2667 #. mount --make-rshared ==> MS_SHARED | MS_REC
2669 #. These settings are visible in proc/mountinfo
2672 #. These need to be documented on this page.
2674 #. Documentation/filesystems/sharedsubtree.txt
2676 #. http://lwn.net/Articles/159077/
2678 #. http://myweb.sudhaa.com:2022/~ram/sharedsubtree/paper/sharedsubtree.1.pdf
2679 #. Shared-Subtree Concept, Implementation, and Applications in Linux
2680 #. Al Viro viro@ftp.linux.org.uk
2681 #. Ram Pai linuxram@us.ibm.com
2683 #. http://foss.in/2005/slides/sharedsubtree1.pdf
2684 #. Shared Subtree Concept and Implementation in the Linux Kernel
2687 #. http://www.ibm.com/developerworks/linux/library/l-mount-namespaces/index.html
2688 #. Applying mount namespaces
2690 #. Uncover practical applications for advanced Linux mounts features
2691 #. Serge E. Hallyn (sergeh@us.ibm.com), Software Engineer, IBM 
2692 #. Ram Pai (linuxram@us.ibm.com), Software Engineer, IBM
2693 #. Date: 17 Sep 2007
2695 #. 2.6.25 Added MS_I_VERSION, which needs to be documented.
2697 #: build/C/man2/mount.2:131
2699 "The I<mountflags> argument may have the magic number 0xC0ED (B<MS_MGC_VAL>) "
2700 "in the top 16 bits (this was required in kernel versions prior to 2.4, but "
2701 "is no longer required and ignored if specified), and various mount flags in "
2702 "the low order 16 bits:"
2706 #: build/C/man2/mount.2:131
2708 msgid "B<MS_BIND> (Linux 2.4 onward)"
2711 #. since 2.4.0-test9
2712 #. with the exception of the "hidden" MS_REC mountflags bit
2714 #: build/C/man2/mount.2:150
2716 "Perform a bind mount, making a file or a directory subtree visible at "
2717 "another point within a file system. Bind mounts may cross file system "
2718 "boundaries and span B<chroot>(2) jails. The I<filesystemtype> and I<data> "
2719 "arguments are ignored. Up until Linux 2.6.26, I<mountflags> was also "
2720 "ignored (the bind mount has the same mount options as the underlying mount "
2725 #: build/C/man2/mount.2:150
2727 msgid "B<MS_DIRSYNC> (since Linux 2.5.19)"
2731 #: build/C/man2/mount.2:156
2733 "Make directory changes on this file system synchronous. (This property can "
2734 "be obtained for individual directories or subtrees using B<chattr>(1).)"
2738 #: build/C/man2/mount.2:156
2740 msgid "B<MS_MANDLOCK>"
2743 #. FIXME Say more about MS_MOVE
2745 #: build/C/man2/mount.2:163
2747 "Permit mandatory locking on files in this file system. (Mandatory locking "
2748 "must still be enabled on a per-file basis, as described in B<fcntl>(2).)"
2752 #: build/C/man2/mount.2:163
2758 #: build/C/man2/mount.2:174
2760 "Move a subtree. I<source> specifies an existing mount point and I<target> "
2761 "specifies the new location. The move is atomic: at no point is the subtree "
2762 "unmounted. The I<filesystemtype>, I<mountflags>, and I<data> arguments are "
2767 #: build/C/man2/mount.2:174
2769 msgid "B<MS_NOATIME>"
2773 #: build/C/man2/mount.2:177
2774 msgid "Do not update access times for (all types of) files on this file system."
2778 #: build/C/man2/mount.2:177
2784 #: build/C/man2/mount.2:180
2785 msgid "Do not allow access to devices (special files) on this file system."
2789 #: build/C/man2/mount.2:180
2791 msgid "B<MS_NODIRATIME>"
2795 #: build/C/man2/mount.2:189
2797 "Do not update access times for directories on this file system. This flag "
2798 "provides a subset of the functionality provided by B<MS_NOATIME>; that is, "
2799 "B<MS_NOATIME> implies B<MS_NODIRATIME>."
2803 #: build/C/man2/mount.2:189
2805 msgid "B<MS_NOEXEC>"
2808 #. (Possibly useful for a file system that contains non-Linux executables.
2809 #. Often used as a security feature, e.g., to make sure that restricted
2810 #. users cannot execute files uploaded using ftp or so.)
2812 #: build/C/man2/mount.2:195
2813 msgid "Do not allow programs to be executed from this file system."
2817 #: build/C/man2/mount.2:195
2819 msgid "B<MS_NOSUID>"
2822 #. (This is a security feature to prevent users executing set-user-ID and
2823 #. set-group-ID programs from removable disk devices.)
2825 #: build/C/man2/mount.2:201
2827 "Do not honor set-user-ID and set-group-ID bits when executing programs from "
2832 #: build/C/man2/mount.2:201
2834 msgid "B<MS_RDONLY>"
2838 #. FIXME Document MS_REC, available since 2.4.11.
2839 #. This flag has meaning in conjunction with MS_BIND and
2840 #. also with the shared subtree flags.
2842 #: build/C/man2/mount.2:208
2843 msgid "Mount file system read-only."
2847 #: build/C/man2/mount.2:208
2849 msgid "B<MS_RELATIME> (Since Linux 2.6.20)"
2852 #. Matthew Garrett notes in the patch that added this behavior
2853 #. that this lets utilities such as tmpreaper (which deletes
2854 #. files based on last acces time) work correctly.
2856 #: build/C/man2/mount.2:229
2858 "When a file on this file system is accessed, update the file's last access "
2859 "time (atime) only if the current value of atime is less than or equal to the "
2860 "file's last modification time (mtime) or last status change time (ctime). "
2861 "This option is useful for programs, such as B<mutt>(1), that need to know "
2862 "when a file has been read since it was last modified. Since Linux 2.6.30, "
2863 "the kernel defaults to the behavior provided by this flag (unless "
2864 "B<MS_NOATIME> was specified), and the B<MS_STRICTATIME> flag is required to "
2865 "obtain traditional semantics. In addition, since Linux 2.6.30, the file's "
2866 "last access time is always updated if it is more than 1 day old."
2870 #: build/C/man2/mount.2:229
2872 msgid "B<MS_REMOUNT>"
2876 #: build/C/man2/mount.2:245
2878 "Remount an existing mount. This allows you to change the I<mountflags> and "
2879 "I<data> of an existing mount without having to unmount and remount the file "
2880 "system. I<target> should be the same value specified in the initial "
2881 "B<mount>() call; I<source> and I<filesystemtype> are ignored."
2885 #: build/C/man2/mount.2:260
2887 "The following I<mountflags> can be changed: B<MS_RDONLY>, B<MS_SYNCHRONOUS>, "
2888 "B<MS_MANDLOCK>; before kernel 2.6.16, the following could also be changed: "
2889 "B<MS_NOATIME> and B<MS_NODIRATIME>; and, additionally, before kernel 2.4.10, "
2890 "the following could also be changed: B<MS_NOSUID>, B<MS_NODEV>, "
2895 #: build/C/man2/mount.2:260
2897 msgid "B<MS_SILENT> (since Linux 2.6.17)"
2901 #: build/C/man2/mount.2:268
2903 "Suppress the display of certain (I<printk>()) warning messages in the "
2904 "kernel log. This flag supersedes the misnamed and obsolete B<MS_VERBOSE> "
2905 "flag (available since Linux 2.4.12), which has the same meaning."
2909 #: build/C/man2/mount.2:268
2911 msgid "B<MS_STRICTATIME> (Since Linux 2.6.30)"
2915 #: build/C/man2/mount.2:278
2917 "Always update the last access time (atime) when files on this file system "
2918 "are accessed. (This was the default behavior before Linux 2.6.30.) "
2919 "Specifying this flag overrides the effect of setting the B<MS_NOATIME> and "
2920 "B<MS_RELATIME> flags."
2924 #: build/C/man2/mount.2:278
2926 msgid "B<MS_SYNCHRONOUS>"
2930 #: build/C/man2/mount.2:286
2932 "Make writes on this file system synchronous (as though the B<O_SYNC> flag to "
2933 "B<open>(2) was specified for all file opens to this file system)."
2937 #: build/C/man2/mount.2:298
2939 "From Linux 2.4 onward, the B<MS_NODEV>, B<MS_NOEXEC>, and B<MS_NOSUID> flags "
2940 "are settable on a per-mount-point basis. From kernel 2.6.16 onward, "
2941 "B<MS_NOATIME> and B<MS_NODIRATIME> are also settable on a per-mount-point "
2942 "basis. The B<MS_RELATIME> flag is also settable on a per-mount-point basis."
2946 #: build/C/man2/mount.2:307
2948 "The I<data> argument is interpreted by the different file systems. "
2949 "Typically it is a string of comma-separated options understood by this file "
2950 "system. See B<mount>(8) for details of the options available for each "
2955 #: build/C/man2/mount.2:312 build/C/man2/stat.2:305 build/C/man2/statfs.2:134 build/C/man3/statvfs.3:101 build/C/man2/umount.2:104
2957 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
2962 #: build/C/man2/mount.2:318
2964 "The error values given below result from filesystem type independent "
2965 "errors. Each file-system type may have its own special errors and its own "
2966 "special behavior. See the Linux kernel source code for details."
2970 #: build/C/man2/mount.2:318 build/C/man2/spu_create.2:173 build/C/man2/stat.2:306 build/C/man2/statfs.2:135 build/C/man3/statvfs.3:102
2975 #. mtk: Probably: write permission is required for MS_BIND, with
2976 #. the error EPERM if not present; CAP_DAC_OVERRIDE is required.
2978 #: build/C/man2/mount.2:333
2980 "A component of a path was not searchable. (See also B<path_resolution>(7).) "
2981 "Or, mounting a read-only file system was attempted without giving the "
2982 "B<MS_RDONLY> flag. Or, the block device I<source> is located on a file "
2983 "system mounted with the B<MS_NODEV> option."
2987 #: build/C/man2/mount.2:333 build/C/man2/umount.2:117
2993 #: build/C/man2/mount.2:345
2995 "I<source> is already mounted. Or, it cannot be remounted read-only, because "
2996 "it still holds files open for writing. Or, it cannot be mounted on "
2997 "I<target> because I<target> is still busy (it is the working directory of "
2998 "some thread, the mount point of another device, has open files, etc.)."
3002 #: 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:317 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
3008 #: build/C/man2/mount.2:348
3009 msgid "One of the pointer arguments points outside the user address space."
3013 #: build/C/man2/mount.2:363
3015 "I<source> had an invalid superblock. Or, a remount (B<MS_REMOUNT>) was "
3016 "attempted, but I<source> was not already mounted on I<target>. Or, a move "
3017 "(B<MS_MOVE>) was attempted, but I<source> was not a mount point, or was "
3022 #: build/C/man2/mount.2:363 build/C/man2/spu_create.2:192 build/C/man2/stat.2:320 build/C/man2/statfs.2:159 build/C/man3/statvfs.3:126
3028 #: build/C/man2/mount.2:370
3030 "Too many links encountered during pathname resolution. Or, a move was "
3031 "attempted, while I<target> is a descendant of I<source>."
3035 #: build/C/man2/mount.2:370 build/C/man2/spu_create.2:196
3041 #: build/C/man2/mount.2:374
3042 msgid "(In case no block device is required:) Table of dummy devices is full."
3046 #: build/C/man2/mount.2:374 build/C/man2/spu_create.2:199 build/C/man2/stat.2:323 build/C/man2/statfs.2:164 build/C/man3/statvfs.3:131 build/C/man2/umount.2:137
3048 msgid "B<ENAMETOOLONG>"
3052 #: build/C/man2/mount.2:378 build/C/man2/umount.2:141
3053 msgid "A pathname was longer than B<MAXPATHLEN>."
3057 #: build/C/man2/mount.2:378 build/C/man2/spu_create.2:206
3063 #: build/C/man2/mount.2:382
3064 msgid "I<filesystemtype> not configured in the kernel."
3068 #: build/C/man2/mount.2:382 build/C/man2/spu_create.2:210 build/C/man2/stat.2:327 build/C/man2/statfs.2:169 build/C/man3/statvfs.3:136 build/C/man2/umount.2:141
3074 #: build/C/man2/mount.2:385 build/C/man2/umount.2:144
3075 msgid "A pathname was empty or had a nonexistent component."
3079 #: 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:334 build/C/man2/statfs.2:175 build/C/man3/statvfs.3:142 build/C/man2/umount.2:144
3085 #: build/C/man2/mount.2:388 build/C/man2/umount.2:147
3086 msgid "The kernel could not allocate a free page to copy filenames or data into."
3090 #: build/C/man2/mount.2:388
3096 #: build/C/man2/mount.2:392
3097 msgid "I<source> is not a block device (and a device was required)."
3101 #: build/C/man2/mount.2:392 build/C/man2/spu_create.2:228 build/C/man2/stat.2:337 build/C/man2/statfs.2:181 build/C/man3/statvfs.3:148
3107 #: build/C/man2/mount.2:398
3108 msgid "I<target>, or a prefix of I<source>, is not a directory."
3112 #: build/C/man2/mount.2:398
3118 #: build/C/man2/mount.2:403
3119 msgid "The major number of the block device I<source> is out of range."
3123 #: build/C/man2/mount.2:403 build/C/man2/spu_create.2:233 build/C/man2/umount.2:147
3129 #: build/C/man2/mount.2:406 build/C/man2/umount.2:150
3130 msgid "The caller does not have the required privileges."
3133 #. FIXME: Definitions of the so-far-undocumented MS_UNBINDABLE, MS_PRIVATE,
3134 #. MS_SHARED, and MS_SLAVE were (also) only added to glibc headers in 2.12.
3136 #: build/C/man2/mount.2:417
3138 "The definitions of B<MS_DIRSYNC>, B<MS_MOVE>, B<MS_REC>, B<MS_RELATIME>, and "
3139 "B<MS_STRICTATIME> were added to glibc headers in version 2.12."
3143 #: build/C/man2/mount.2:420
3145 "This function is Linux-specific and should not be used in programs intended "
3150 #: build/C/man2/mount.2:429
3152 "The original B<MS_SYNC> flag was renamed B<MS_SYNCHRONOUS> in 1.1.69 when a "
3153 "different B<MS_SYNC> was added to I<E<lt>mman.hE<gt>>."
3156 #. The change is in patch-2.4.0-prerelease.
3158 #: build/C/man2/mount.2:438
3160 "Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program "
3161 "on a file system mounted with B<MS_NOSUID> would fail with B<EPERM>. Since "
3162 "Linux 2.4 the set-user-ID and set-group-ID bits are just silently ignored in "
3167 #: build/C/man2/mount.2:438
3169 msgid "Per-process namespaces"
3173 #: build/C/man2/mount.2:449
3175 "Starting with kernel 2.4.19, Linux provides per-process mount namespaces. A "
3176 "mount namespace is the set of file system mounts that are visible to a "
3177 "process. Mount-point namespaces can be (and usually are) shared between "
3178 "multiple processes, and changes to the namespace (i.e., mounts and unmounts) "
3179 "by one process are visible to all other processes sharing the same "
3180 "namespace. (The pre-2.4.19 Linux situation can be considered as one in "
3181 "which a single namespace was shared by every process on the system.)"
3185 #: build/C/man2/mount.2:455
3187 "A child process created by B<fork>(2) shares its parent's mount namespace; "
3188 "the mount namespace is preserved across an B<execve>(2)."
3192 #: build/C/man2/mount.2:475
3194 "A process can obtain a private mount namespace if: it was created using the "
3195 "B<clone>(2) B<CLONE_NEWNS> flag, in which case its new namespace is "
3196 "initialized to be a I<copy> of the namespace of the process that called "
3197 "B<clone>(2); or it calls B<unshare>(2) with the B<CLONE_NEWNS> flag, which "
3198 "causes the caller's mount namespace to obtain a private copy of the "
3199 "namespace that it was previously sharing with other processes, so that "
3200 "future mounts and unmounts by the caller are invisible to other processes "
3201 "(except child processes that the caller subsequently creates) and vice "
3206 #: build/C/man2/mount.2:482
3208 "The Linux-specific I</proc/PID/mounts> file exposes the list of mount points "
3209 "in the mount namespace of the process with the specified ID; see B<proc>(5) "
3214 #: build/C/man2/mount.2:488
3216 "B<umount>(2), B<namespaces>(7), B<path_resolution>(7), B<mount>(8), "
3221 #: build/C/man7/path_resolution.7:25
3223 msgid "PATH_RESOLUTION"
3227 #: build/C/man7/path_resolution.7:25
3233 #: build/C/man7/path_resolution.7:28
3234 msgid "path_resolution - how a pathname is resolved to a file"
3238 #: build/C/man7/path_resolution.7:31
3240 "Some UNIX/Linux system calls have as parameter one or more filenames. A "
3241 "filename (or pathname) is resolved as follows."
3245 #: build/C/man7/path_resolution.7:31
3247 msgid "Step 1: start of the resolution process"
3251 #: build/C/man7/path_resolution.7:50
3253 "If the pathname starts with the \\(aq/\\(aq character, the starting lookup "
3254 "directory is the root directory of the calling process. (A process inherits "
3255 "its root directory from its parent. Usually this will be the root directory "
3256 "of the file hierarchy. A process may get a different root directory by use "
3257 "of the B<chroot>(2) system call. A process may get an entirely private "
3258 "mount namespace in case it\\(emor one of its ancestors\\(emwas started by an "
3259 "invocation of the B<clone>(2) system call that had the B<CLONE_NEWNS> flag "
3260 "set.) This handles the \\(aq/\\(aq part of the pathname."
3264 #: build/C/man7/path_resolution.7:58
3266 "If the pathname does not start with the \\(aq/\\(aq character, the starting "
3267 "lookup directory of the resolution process is the current working directory "
3268 "of the process. (This is also inherited from the parent. It can be changed "
3269 "by use of the B<chdir>(2) system call.)"
3273 #: build/C/man7/path_resolution.7:61
3275 "Pathnames starting with a \\(aq/\\(aq character are called absolute "
3276 "pathnames. Pathnames not starting with a \\(aq/\\(aq are called relative "
3281 #: build/C/man7/path_resolution.7:61
3283 msgid "Step 2: walk along the path"
3287 #: build/C/man7/path_resolution.7:66
3289 "Set the current lookup directory to the starting lookup directory. Now, for "
3290 "each nonfinal component of the pathname, where a component is a substring "
3291 "delimited by \\(aq/\\(aq characters, this component is looked up in the "
3292 "current lookup directory."
3296 #: build/C/man7/path_resolution.7:72
3298 "If the process does not have search permission on the current lookup "
3299 "directory, an B<EACCES> error is returned (\"Permission denied\")."
3303 #: build/C/man7/path_resolution.7:77
3305 "If the component is not found, an B<ENOENT> error is returned (\"No such "
3306 "file or directory\")."
3310 #: build/C/man7/path_resolution.7:82
3312 "If the component is found, but is neither a directory nor a symbolic link, "
3313 "an B<ENOTDIR> error is returned (\"Not a directory\")."
3317 #: build/C/man7/path_resolution.7:86
3319 "If the component is found and is a directory, we set the current lookup "
3320 "directory to that directory, and go to the next component."
3324 #. presently: max recursion depth during symlink resolution: 5
3325 #. max total number of symbolic links followed: 40
3326 #. _POSIX_SYMLOOP_MAX is 8
3328 #: build/C/man7/path_resolution.7:110
3330 "If the component is found and is a symbolic link (symlink), we first resolve "
3331 "this symbolic link (with the current lookup directory as starting lookup "
3332 "directory). Upon error, that error is returned. If the result is not a "
3333 "directory, an B<ENOTDIR> error is returned. If the resolution of the "
3334 "symlink is successful and returns a directory, we set the current lookup "
3335 "directory to that directory, and go to the next component. Note that the "
3336 "resolution process here involves recursion. In order to protect the kernel "
3337 "against stack overflow, and also to protect against denial of service, there "
3338 "are limits on the maximum recursion depth, and on the maximum number of "
3339 "symbolic links followed. An B<ELOOP> error is returned when the maximum is "
3340 "exceeded (\"Too many levels of symbolic links\")."
3344 #: build/C/man7/path_resolution.7:110
3346 msgid "Step 3: find the final entry"
3350 #: build/C/man7/path_resolution.7:122
3352 "The lookup of the final component of the pathname goes just like that of all "
3353 "other components, as described in the previous step, with two differences: "
3354 "(i) the final component need not be a directory (at least as far as the path "
3355 "resolution process is concerned\\(emit may have to be a directory, or a "
3356 "nondirectory, because of the requirements of the specific system call), and "
3357 "(ii) it is not necessarily an error if the component is not found\\(emmaybe "
3358 "we are just creating it. The details on the treatment of the final entry "
3359 "are described in the manual pages of the specific system calls."
3363 #: build/C/man7/path_resolution.7:122
3369 #: build/C/man7/path_resolution.7:126
3371 "By convention, every directory has the entries \".\" and \"..\", which refer "
3372 "to the directory itself and to its parent directory, respectively."
3376 #: build/C/man7/path_resolution.7:130
3378 "The path resolution process will assume that these entries have their "
3379 "conventional meanings, regardless of whether they are actually present in "
3380 "the physical file system."
3384 #: build/C/man7/path_resolution.7:132
3385 msgid "One cannot walk down past the root: \"/..\" is the same as \"/\"."
3389 #: build/C/man7/path_resolution.7:132
3391 msgid "Mount points"
3395 #: build/C/man7/path_resolution.7:136
3397 "After a \"mount dev path\" command, the pathname \"path\" refers to the root "
3398 "of the file system hierarchy on the device \"dev\", and no longer to "
3399 "whatever it referred to earlier."
3403 #: build/C/man7/path_resolution.7:140
3405 "One can walk out of a mounted file system: \"path/..\" refers to the parent "
3406 "directory of \"path\", outside of the file system hierarchy on \"dev\"."
3410 #: build/C/man7/path_resolution.7:140
3412 msgid "Trailing slashes"
3416 #: build/C/man7/path_resolution.7:146
3418 "If a pathname ends in a \\(aq/\\(aq, that forces resolution of the preceding "
3419 "component as in Step 2: it has to exist and resolve to a directory. "
3420 "Otherwise a trailing \\(aq/\\(aq is ignored. (Or, equivalently, a pathname "
3421 "with a trailing \\(aq/\\(aq is equivalent to the pathname obtained by "
3422 "appending \\(aq.\\(aq to it.)"
3426 #: build/C/man7/path_resolution.7:146
3428 msgid "Final symlink"
3432 #: build/C/man7/path_resolution.7:155
3434 "If the last component of a pathname is a symbolic link, then it depends on "
3435 "the system call whether the file referred to will be the symbolic link or "
3436 "the result of path resolution on its contents. For example, the system call "
3437 "B<lstat>(2) will operate on the symlink, while B<stat>(2) operates on the "
3438 "file pointed to by the symlink."
3442 #: build/C/man7/path_resolution.7:155
3444 msgid "Length limit"
3448 #: build/C/man7/path_resolution.7:162
3450 "There is a maximum length for pathnames. If the pathname (or some "
3451 "intermediate pathname obtained while resolving symbolic links) is too long, "
3452 "an B<ENAMETOOLONG> error is returned (\"Filename too long\")."
3456 #: build/C/man7/path_resolution.7:162
3458 msgid "Empty pathname"
3462 #: build/C/man7/path_resolution.7:169
3464 "In the original UNIX, the empty pathname referred to the current directory. "
3465 "Nowadays POSIX decrees that an empty pathname must not be resolved "
3466 "successfully. Linux returns B<ENOENT> in this case."
3470 #: build/C/man7/path_resolution.7:169
3476 #: build/C/man7/path_resolution.7:182
3478 "The permission bits of a file consist of three groups of three bits, cf.\\& "
3479 "B<chmod>(1) and B<stat>(2). The first group of three is used when the "
3480 "effective user ID of the calling process equals the owner ID of the file. "
3481 "The second group of three is used when the group ID of the file either "
3482 "equals the effective group ID of the calling process, or is one of the "
3483 "supplementary group IDs of the calling process (as set by B<setgroups>(2)). "
3484 "When neither holds, the third group is used."
3488 #: build/C/man7/path_resolution.7:186
3490 "Of the three bits used, the first bit determines read permission, the second "
3491 "write permission, and the last execute permission in case of ordinary files, "
3492 "or search permission in case of directories."
3496 #: build/C/man7/path_resolution.7:191
3498 "Linux uses the fsuid instead of the effective user ID in permission checks. "
3499 "Ordinarily the fsuid will equal the effective user ID, but the fsuid can be "
3500 "changed by the system call B<setfsuid>(2)."
3504 #: build/C/man7/path_resolution.7:199
3506 "(Here \"fsuid\" stands for something like \"file system user ID\". The "
3507 "concept was required for the implementation of a user space NFS server at a "
3508 "time when processes could send a signal to a process with the same effective "
3509 "user ID. It is obsolete now. Nobody should use B<setfsuid>(2).)"
3512 #. FIXME say something about file system mounted read-only ?
3514 #: build/C/man7/path_resolution.7:205
3516 "Similarly, Linux uses the fsgid (\"file system group ID\") instead of the "
3517 "effective group ID. See B<setfsgid>(2)."
3521 #: build/C/man7/path_resolution.7:205
3523 msgid "Bypassing permission checks: superuser and capabilities"
3526 #. (but for exec at least one x bit must be set) -- AEB
3527 #. but there is variation across systems on this point: for
3528 #. example, HP-UX and Tru64 are as described by AEB. However,
3529 #. on some implementations (e.g., Solaris, FreeBSD),
3530 #. access(X_OK) by superuser will report success, regardless
3531 #. of the file's execute permission bits. -- MTK (Oct 05)
3533 #: build/C/man7/path_resolution.7:216
3535 "On a traditional UNIX system, the superuser (I<root>, user ID 0) is "
3536 "all-powerful, and bypasses all permissions restrictions when accessing "
3541 #: build/C/man7/path_resolution.7:224
3543 "On Linux, superuser privileges are divided into capabilities (see "
3544 "B<capabilities>(7)). Two capabilities are relevant for file permissions "
3545 "checks: B<CAP_DAC_OVERRIDE> and B<CAP_DAC_READ_SEARCH>. (A process has "
3546 "these capabilities if its fsuid is 0.)"
3550 #: build/C/man7/path_resolution.7:230
3552 "The B<CAP_DAC_OVERRIDE> capability overrides all permission checking, but "
3553 "grants execute permission only when at least one of the file's three execute "
3554 "permission bits is set."
3557 #. FIXME say something about immutable files
3558 #. FIXME say something about ACLs
3560 #: build/C/man7/path_resolution.7:237
3562 "The B<CAP_DAC_READ_SEARCH> capability grants read and search permission on "
3563 "directories, and read permission on ordinary files."
3567 #: build/C/man7/path_resolution.7:242
3568 msgid "B<readlink>(2), B<capabilities>(7), B<credentials>(7), B<symlink>(7)"
3572 #: build/C/man2/removexattr.2:25
3578 #: build/C/man2/removexattr.2:28
3579 msgid "removexattr, lremovexattr, fremovexattr - remove an extended attribute"
3583 #: build/C/man2/removexattr.2:37
3586 "B<int removexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3587 "B<int lremovexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3588 "B<int fremovexattr(int >I<fd>B<, const char\\ *>I<name>B<);>\n"
3592 #: build/C/man2/removexattr.2:49
3594 "Extended attributes are I<name>:value pairs associated with inodes (files, "
3595 "directories, symbolic links, etc.). They are extensions to the normal "
3596 "attributes which are associated with all inodes in the system (i.e., the "
3597 "B<stat>(2) data). A complete overview of extended attributes concepts can "
3598 "be found in B<attr>(5)."
3602 #: build/C/man2/removexattr.2:56
3604 "B<removexattr>() removes the extended attribute identified by I<name> and "
3605 "associated with the given I<path> in the file system."
3609 #: build/C/man2/removexattr.2:62
3611 "B<lremovexattr>() is identical to B<removexattr>(), except in the case of a "
3612 "symbolic link, where the extended attribute is removed from the link itself, "
3613 "not the file that it refers to."
3617 #: build/C/man2/removexattr.2:72
3619 "B<fremovexattr>() is identical to B<removexattr>(), only the extended "
3620 "attribute is removed from the open file referred to by I<fd> (as returned by "
3621 "B<open>(2)) in place of I<path>."
3625 #: build/C/man2/removexattr.2:78
3627 "An extended attribute name is a simple null-terminated string. The I<name> "
3628 "includes a namespace prefix; there may be several, disjoint namespaces "
3629 "associated with an individual inode."
3633 #: build/C/man2/removexattr.2:83 build/C/man2/setxattr.2:110
3635 "On success, zero is returned. On failure, -1 is returned and I<errno> is "
3636 "set appropriately."
3640 #: build/C/man2/removexattr.2:92
3642 "The named attribute does not exist. (B<ENOATTR> is defined to be a synonym "
3643 "for B<ENODATA> in I<E<lt>attr/xattr.hE<gt>>.)"
3647 #: build/C/man2/removexattr.2:120
3649 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3650 "B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3654 #: build/C/man2/setxattr.2:25
3660 #: build/C/man2/setxattr.2:28
3661 msgid "setxattr, lsetxattr, fsetxattr - set an extended attribute value"
3665 #: build/C/man2/setxattr.2:40
3668 "B<int setxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3669 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3671 "B<int lsetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3672 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3674 "B<int fsetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
3675 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3680 #: build/C/man2/setxattr.2:67
3682 "B<setxattr>() sets the I<value> of the extended attribute identified by "
3683 "I<name> and associated with the given I<path> in the file system. The "
3684 "I<size> of the I<value> must be specified."
3688 #: build/C/man2/setxattr.2:73
3690 "B<lsetxattr>() is identical to B<setxattr>(), except in the case of a "
3691 "symbolic link, where the extended attribute is set on the link itself, not "
3692 "the file that it refers to."
3696 #: build/C/man2/setxattr.2:83
3698 "B<fsetxattr>() is identical to B<setxattr>(), only the extended attribute "
3699 "is set on the open file referred to by I<fd> (as returned by B<open>(2)) in "
3704 #: build/C/man2/setxattr.2:93
3706 "An extended attribute name is a simple null-terminated string. The I<name> "
3707 "includes a namespace prefix; there may be several, disjoint namespaces "
3708 "associated with an individual inode. The I<value> of an extended attribute "
3709 "is a chunk of arbitrary textual or binary data of specified length."
3713 #: build/C/man2/setxattr.2:105
3715 "The I<flags> argument can be used to refine the semantics of the operation. "
3716 "B<XATTR_CREATE> specifies a pure create, which fails if the named attribute "
3717 "exists already. B<XATTR_REPLACE> specifies a pure replace operation, which "
3718 "fails if the named attribute does not already exist. By default (no flags), "
3719 "the extended attribute will be created if need be, or will simply replace "
3720 "the value if the attribute exists."
3724 #: build/C/man2/setxattr.2:111
3730 #: build/C/man2/setxattr.2:115
3732 "Disk quota limits meant that there is insufficient space remaining to store "
3733 "the extended attribute."
3737 #: build/C/man2/setxattr.2:115 build/C/man2/spu_create.2:178
3743 #: build/C/man2/setxattr.2:119
3744 msgid "B<XATTR_CREATE> was specified, and the attribute exists already."
3748 #: build/C/man2/setxattr.2:128
3750 "B<XATTR_REPLACE> was specified, and the attribute does not exist. "
3751 "(B<ENOATTR> is defined to be a synonym for B<ENODATA> in "
3752 "I<E<lt>attr/xattr.hE<gt>>.)"
3756 #: build/C/man2/setxattr.2:128 build/C/man2/spu_create.2:218
3762 #: build/C/man2/setxattr.2:131
3763 msgid "There is insufficient space remaining to store the extended attribute."
3767 #: build/C/man2/setxattr.2:137
3769 "Extended attributes are not supported by the file system, or are disabled, "
3770 "I<errno> is set to B<ENOTSUP>."
3774 #: build/C/man2/setxattr.2:162
3776 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3777 "B<removexattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3781 #: build/C/man2/spu_create.2:25
3787 #: build/C/man2/spu_create.2:28
3788 msgid "spu_create - create a new spu context"
3792 #: build/C/man2/spu_create.2:32
3795 "B<#include E<lt>sys/types.hE<gt>>\n"
3796 "B<#include E<lt>sys/spu.hE<gt>>\n"
3800 #: build/C/man2/spu_create.2:36
3803 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3805 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3807 "B< int >I<neighbor_fd>B<);>\n"
3811 #: build/C/man2/spu_create.2:40 build/C/man2/spu_run.2:39
3812 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
3816 #: build/C/man2/spu_create.2:59
3818 "The B<spu_create>() system call is used on PowerPC machines that implement "
3819 "the Cell Broadband Engine Architecture in order to access Synergistic "
3820 "Processor Units (SPUs). It creates a new logical context for an SPU in "
3821 "I<pathname> and returns a file descriptor associated with it. I<pathname> "
3822 "must refer to a nonexistent directory in the mount point of the SPU file "
3823 "system (B<spufs>). If B<spu_create>() is successful, a directory is "
3824 "created at I<pathname> and it is populated with the files described in "
3829 #: build/C/man2/spu_create.2:78
3831 "When a context is created, the returned file descriptor can only be passed "
3832 "to B<spu_run>(2), used as the I<dirfd> argument to the B<*at> family of "
3833 "system calls (e.g., B<openat>(2)), or closed; other operations are not "
3834 "defined. A logical SPU context is destroyed (along with all files created "
3835 "within the context's I<pathname> directory) once the last reference to the "
3836 "context has gone; this usually occurs when the file descriptor returned by "
3837 "B<spu_create>() is closed."
3841 #: build/C/man2/spu_create.2:83
3843 "The I<flags> argument can be zero or any bitwise OR-ed combination of the "
3844 "following constants:"
3848 #: build/C/man2/spu_create.2:83
3850 msgid "B<SPU_CREATE_EVENTS_ENABLED>"
3854 #: build/C/man2/spu_create.2:89
3856 "Rather than using signals for reporting DMA errors, use the I<event> "
3857 "argument to B<spu_run>(2)."
3861 #: build/C/man2/spu_create.2:89
3863 msgid "B<SPU_CREATE_GANG>"
3867 #: build/C/man2/spu_create.2:97
3869 "Create an SPU gang instead of a context. (A gang is a group of SPU contexts "
3870 "that are functionally related to each other and which share common "
3871 "scheduling parameters\\(empriority and policy. In the future, gang "
3872 "scheduling may be implemented causing the group to be switched in and out as "
3877 #: build/C/man2/spu_create.2:104
3879 "A new directory will be created at the location specified by the I<pathname> "
3880 "argument. This gang may be used to hold other SPU contexts, by providing a "
3881 "pathname that is within the gang directory to further calls to "
3886 #: build/C/man2/spu_create.2:104
3888 msgid "B<SPU_CREATE_NOSCHED>"
3892 #: build/C/man2/spu_create.2:110
3894 "Create a context that is not affected by the SPU scheduler. Once the "
3895 "context is run, it will not be scheduled out until it is destroyed by the "
3900 #: build/C/man2/spu_create.2:121
3902 "Because the context cannot be removed from the SPU, some functionality is "
3903 "disabled for B<SPU_CREATE_NOSCHED> contexts. Only a subset of the files "
3904 "will be available in this context directory in B<spufs>. Additionally, "
3905 "B<SPU_CREATE_NOSCHED> contexts cannot dump a core file when crashing."
3909 #: build/C/man2/spu_create.2:127
3911 "Creating B<SPU_CREATE_NOSCHED> contexts requires the B<CAP_SYS_NICE> "
3916 #: build/C/man2/spu_create.2:127
3918 msgid "B<SPU_CREATE_ISOLATE>"
3922 #: build/C/man2/spu_create.2:134
3924 "Create an isolated SPU context. Isolated contexts are protected from some "
3925 "PPE (PowerPC Processing Element) operations, such as access to the SPU "
3926 "local store and the NPC register."
3930 #: build/C/man2/spu_create.2:140
3932 "Creating B<SPU_CREATE_ISOLATE> contexts also requires the "
3933 "B<SPU_CREATE_NOSCHED> flag."
3937 #: build/C/man2/spu_create.2:140
3939 msgid "B<SPU_CREATE_AFFINITY_SPU>"
3943 #: build/C/man2/spu_create.2:148
3945 "Create a context with affinity to another SPU context. This affinity "
3946 "information is used within the SPU scheduling algorithm. Using this flag "
3947 "requires that a file descriptor referring to the other SPU context be passed "
3948 "in the I<neighbor_fd> argument."
3952 #: build/C/man2/spu_create.2:148
3954 msgid "B<SPU_CREATE_AFFINITY_MEM>"
3958 #: build/C/man2/spu_create.2:153
3960 "Create a context with affinity to system memory. This affinity information "
3961 "is used within the SPU scheduling algorithm."
3965 #: build/C/man2/spu_create.2:165
3967 "The I<mode> argument (minus any bits set in the process's B<umask>(2)) "
3968 "specifies the permissions used for creating the new directory in B<spufs>. "
3969 "See B<stat>(2) for a full list of the possible I<mode> values."
3973 #: build/C/man2/spu_create.2:172
3975 "On success, B<spu_create>() returns a new file descriptor. On error, -1 is "
3976 "returned, and I<errno> is set to one of the error codes listed below."
3980 #: build/C/man2/spu_create.2:178
3981 msgid "The current user does not have write access to the B<spufs>(7) mount point."
3985 #: build/C/man2/spu_create.2:181
3986 msgid "An SPU context already exists at the given path name."
3990 #: build/C/man2/spu_create.2:186
3992 "I<pathname> is not a valid string pointer in the calling process's address "
3997 #: build/C/man2/spu_create.2:192
3999 "I<pathname> is not a directory in the B<spufs>(7) mount point, or invalid "
4000 "flags have been provided."
4004 #: build/C/man2/spu_create.2:196
4005 msgid "Too many symbolic links were found while resolving I<pathname>."
4009 #: build/C/man2/spu_create.2:199
4010 msgid "The process has reached its maximum open files limit."
4014 #: build/C/man2/spu_create.2:203
4015 msgid "I<pathname> is too long."
4019 #: build/C/man2/spu_create.2:203
4025 #: build/C/man2/spu_create.2:206
4026 msgid "The system has reached the global open files limit."
4030 #: build/C/man2/spu_create.2:210
4032 "An isolated context was requested, but the hardware does not support SPU "
4037 #: build/C/man2/spu_create.2:215
4038 msgid "Part of I<pathname> could not be resolved."
4042 #: build/C/man2/spu_create.2:218
4043 msgid "The kernel could not allocate all resources required."
4047 #: build/C/man2/spu_create.2:223
4049 "There are not enough SPU resources available to create a new context or the "
4050 "user-specific limit for the number of SPU contexts has been reached."
4054 #: 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
4060 #: build/C/man2/spu_create.2:228 build/C/man2/spu_run.2:188
4062 "The functionality is not provided by the current system, because either the "
4063 "hardware does not provide SPUs or the spufs module is not loaded."
4067 #: build/C/man2/spu_create.2:233
4068 msgid "A part of I<pathname> is not a directory."
4072 #: build/C/man2/spu_create.2:240
4074 "The I<SPU_CREATE_NOSCHED> flag has been given, but the user does not have "
4075 "the B<CAP_SYS_NICE> capability."
4079 #: build/C/man2/spu_create.2:246
4081 "I<pathname> must point to a location beneath the mount point of B<spufs>. "
4082 "By convention, it gets mounted in I</spu>."
4086 #: build/C/man2/spu_create.2:250
4087 msgid "The B<spu_create>() system call was added to Linux in kernel 2.6.16."
4091 #: build/C/man2/spu_create.2:254
4093 "This call is Linux-specific and implemented only on the PowerPC "
4094 "architecture. Programs using this system call are not portable."
4098 #: build/C/man2/spu_create.2:265
4100 "Glibc does not provide a wrapper for this system call; call it using "
4101 "B<syscall>(2). Note however, that B<spu_create>() is meant to be used from "
4102 "libraries that implement a more abstract interface to SPUs, not to be used "
4103 "from regular applications. See E<.UR "
4104 "http://www.bsc.es\\:/projects\\:/deepcomputing\\:/linuxoncell/> E<.UE> for "
4105 "the recommended libraries."
4109 #: build/C/man2/spu_create.2:270
4110 msgid "See B<spu_run>(2) for an example of the use of B<spu_create>()"
4114 #: build/C/man2/spu_create.2:275
4115 msgid "B<close>(2), B<spu_run>(2), B<capabilities>(7), B<spufs>(7)"
4119 #: build/C/man2/spu_run.2:26
4125 #: build/C/man2/spu_run.2:29
4126 msgid "spu_run - execute an SPU context"
4130 #: build/C/man2/spu_run.2:32
4132 msgid "B<#include E<lt>sys/spu.hE<gt>>\n"
4136 #: build/C/man2/spu_run.2:35
4139 "B<int spu_run(int >I<fd>B<, unsigned int *>I<npc>B<, unsigned int "
4144 #: build/C/man2/spu_run.2:53
4146 "The B<spu_run>() system call is used on PowerPC machines that implement the "
4147 "Cell Broadband Engine Architecture in order to access Synergistic Processor "
4148 "Units (SPUs). The I<fd> argument is a file descriptor returned by "
4149 "B<spu_create>(2) that refers to a specific SPU context. When the context "
4150 "gets scheduled to a physical SPU, it starts execution at the instruction "
4151 "pointer passed in I<npc>."
4155 #: build/C/man2/spu_run.2:62
4157 "Execution of SPU code happens synchronously, meaning that B<spu_run>() "
4158 "blocks while the SPU is still running. If there is a need to execute SPU "
4159 "code in parallel with other code on either the main CPU or other SPUs, a new "
4160 "thread of execution must be created first (e.g., using "
4161 "B<pthread_create>(3))."
4165 #: build/C/man2/spu_run.2:72
4167 "When B<spu_run>() returns, the current value of the SPU program counter is "
4168 "written to I<npc>, so successive calls to B<spu_run>() can use the same "
4173 #: build/C/man2/spu_run.2:82
4175 "The I<event> argument provides a buffer for an extended status code. If the "
4176 "SPU context was created with the B<SPU_CREATE_EVENTS_ENABLED> flag, then "
4177 "this buffer is populated by the Linux kernel before B<spu_run>() returns."
4181 #: build/C/man2/spu_run.2:84
4182 msgid "The status code may be one (or more) of the following constants:"
4186 #: build/C/man2/spu_run.2:84
4188 msgid "B<SPE_EVENT_DMA_ALIGNMENT>"
4192 #: build/C/man2/spu_run.2:87
4193 msgid "A DMA alignment error occurred."
4197 #: build/C/man2/spu_run.2:87
4199 msgid "B<SPE_EVENT_INVALID_DMA>"
4203 #: build/C/man2/spu_run.2:90
4204 msgid "An invalid MFC DMA command was attempted."
4208 #: build/C/man2/spu_run.2:90
4210 msgid "B<SPE_EVENT_SPE_DATA_STORAGE>"
4214 #: build/C/man2/spu_run.2:93
4215 msgid "A DMA storage error occurred."
4219 #: build/C/man2/spu_run.2:93
4221 msgid "B<SPE_EVENT_SPE_ERROR>"
4225 #: build/C/man2/spu_run.2:96
4226 msgid "An illegal instruction was executed."
4230 #: build/C/man2/spu_run.2:102
4232 "NULL is a valid value for the I<event> argument. In this case, the events "
4233 "will not be reported to the calling process."
4237 #: build/C/man2/spu_run.2:111
4239 "On success, B<spu_run>() returns the value of the I<spu_status> register. "
4240 "On error it returns -1 and sets I<errno> to one of the error codes listed "
4245 #: build/C/man2/spu_run.2:120
4247 "The I<spu_status> register value is a bit mask of status codes and "
4248 "optionally a 14-bit code returned from the B<stop-and-signal> instruction on "
4249 "the SPU. The bit masks for the status codes are:"
4253 #: build/C/man2/spu_run.2:120
4259 #: build/C/man2/spu_run.2:125
4260 msgid "SPU was stopped by a B<stop-and-signal> instruction."
4264 #: build/C/man2/spu_run.2:125
4270 #: build/C/man2/spu_run.2:130
4271 msgid "SPU was stopped by a B<halt> instruction."
4275 #: build/C/man2/spu_run.2:130
4281 #: build/C/man2/spu_run.2:133
4282 msgid "SPU is waiting for a channel."
4286 #: build/C/man2/spu_run.2:133
4292 #: build/C/man2/spu_run.2:136
4293 msgid "SPU is in single-step mode."
4297 #: build/C/man2/spu_run.2:136
4303 #: build/C/man2/spu_run.2:139
4304 msgid "SPU has tried to execute an invalid instruction."
4308 #: build/C/man2/spu_run.2:139
4314 #: build/C/man2/spu_run.2:142
4315 msgid "SPU has tried to access an invalid channel."
4319 #: build/C/man2/spu_run.2:142
4321 msgid "B<0x3fff0000>"
4325 #: build/C/man2/spu_run.2:148
4327 "The bits masked with this value contain the code returned from a "
4328 "B<stop-and-signal> instruction. These bits are valid only if the 0x02 bit "
4333 #: build/C/man2/spu_run.2:153
4335 "If B<spu_run>() has not returned an error, one or more bits among the lower "
4336 "eight ones are always set."
4340 #: build/C/man2/spu_run.2:154 build/C/man2/stat.2:313 build/C/man2/statfs.2:142 build/C/man3/statvfs.3:109
4346 #: build/C/man2/spu_run.2:158
4347 msgid "I<fd> is not a valid file descriptor."
4351 #: build/C/man2/spu_run.2:164
4353 "I<npc> is not a valid pointer, or I<event> is non-NULL and an invalid "
4358 #: build/C/man2/spu_run.2:164 build/C/man2/statfs.2:153 build/C/man3/statvfs.3:120
4364 #: build/C/man2/spu_run.2:174
4366 "A signal occurred while B<spu_run>() was in progress; see B<signal>(7). "
4367 "The I<npc> value has been updated to the new program counter value if "
4372 #: build/C/man2/spu_run.2:179
4373 msgid "I<fd> is not a valid file descriptor returned from B<spu_create>(2)."
4377 #: build/C/man2/spu_run.2:183
4379 "There was not enough memory available to handle a page fault resulting from "
4380 "a Memory Flow Controller (MFC) direct memory access."
4384 #: build/C/man2/spu_run.2:192
4385 msgid "The B<spu_run>() system call was added to Linux in kernel 2.6.16."
4389 #: build/C/man2/spu_run.2:196
4391 "This call is Linux-specific and implemented only by the PowerPC "
4392 "architecture. Programs using this system call are not portable."
4396 #: build/C/man2/spu_run.2:207
4398 "Glibc does not provide a wrapper for this system call; call it using "
4399 "B<syscall>(2). Note however, that B<spu_run>() is meant to be used from "
4400 "libraries that implement a more abstract interface to SPUs, not to be used "
4401 "from regular applications. See E<.UR "
4402 "http://www.bsc.es\\:/projects\\:/deepcomputing\\:/linuxoncell/> E<.UE> for "
4403 "the recommended libraries."
4407 #: build/C/man2/spu_run.2:212
4409 "The following is an example of running a simple, one-instruction SPU program "
4410 "with the B<spu_run>() system call."
4414 #: build/C/man2/spu_run.2:220
4417 "#include E<lt>stdlib.hE<gt>\n"
4418 "#include E<lt>stdint.hE<gt>\n"
4419 "#include E<lt>unistd.hE<gt>\n"
4420 "#include E<lt>stdio.hE<gt>\n"
4421 "#include E<lt>sys/types.hE<gt>\n"
4422 "#include E<lt>fcntl.hE<gt>\n"
4426 #: build/C/man2/spu_run.2:223
4429 "#define handle_error(msg) \\e\n"
4430 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4434 #: build/C/man2/spu_run.2:228
4439 " int context, fd, spu_status;\n"
4440 " uint32_t instruction, npc;\n"
4444 #: build/C/man2/spu_run.2:232
4447 " context = spu_create(\"/spu/example-context\", 0, 0755);\n"
4448 " if (context == -1)\n"
4449 " handle_error(\"spu_create\");\n"
4453 #: build/C/man2/spu_run.2:237
4456 " /* write a \\(aqstop 0x1234\\(aq instruction to the SPU\\(aqs\n"
4457 " * local store memory\n"
4459 " instruction = 0x00001234;\n"
4463 #: build/C/man2/spu_run.2:242
4466 " fd = open(\"/spu/example-context/mem\", O_RDWR);\n"
4468 " handle_error(\"open\");\n"
4469 " write(fd, &instruction, sizeof(instruction));\n"
4473 #: build/C/man2/spu_run.2:248
4476 " /* set npc to the starting instruction address of the\n"
4477 " * SPU program. Since we wrote the instruction at the\n"
4478 " * start of the mem file, the entry point will be 0x0\n"
4484 #: build/C/man2/spu_run.2:252
4487 " spu_status = spu_run(context, &npc, NULL);\n"
4488 " if (spu_status == -1)\n"
4489 " handle_error(\"open\");\n"
4493 #: build/C/man2/spu_run.2:258
4496 " /* we should see a status code of 0x1234002:\n"
4497 " * 0x00000002 (spu was stopped due to stop-and-signal)\n"
4498 " * | 0x12340000 (the stop-and-signal code)\n"
4500 " printf(\"SPU Status: 0x%08x\\en\", spu_status);\n"
4504 #: build/C/man2/spu_run.2:261 build/C/man2/stat.2:654
4507 " exit(EXIT_SUCCESS);\n"
4512 #: build/C/man2/spu_run.2:269
4513 msgid "B<close>(2), B<spu_create>(2), B<capabilities>(7), B<spufs>(7)"
4517 #: build/C/man7/spufs.7:27
4523 #: build/C/man7/spufs.7:27
4529 #: build/C/man7/spufs.7:30
4530 msgid "spufs - SPU file system"
4534 #: build/C/man7/spufs.7:34
4536 "The SPU file system is used on PowerPC machines that implement the Cell "
4537 "Broadband Engine Architecture in order to access Synergistic Processor Units "
4542 #: build/C/man7/spufs.7:43
4544 "The file system provides a name space similar to POSIX shared memory or "
4545 "message queues. Users that have write permissions on the file system can "
4546 "use B<spu_create>(2) to establish SPU contexts under the B<spufs> root "
4551 #: build/C/man7/spufs.7:50
4553 "Every SPU context is represented by a directory containing a predefined set "
4554 "of files. These files can be used for manipulating the state of the logical "
4555 "SPU. Users can change permissions on the files, but can't add or remove "
4560 #: build/C/man7/spufs.7:50
4562 msgid "Mount options"
4566 #: build/C/man7/spufs.7:51
4568 msgid "B<uid=E<lt>uidE<gt>>"
4572 #: build/C/man7/spufs.7:54
4573 msgid "Set the user owning the mount point; the default is 0 (root)."
4577 #: build/C/man7/spufs.7:54
4579 msgid "B<gid=E<lt>gidE<gt>>"
4583 #: build/C/man7/spufs.7:57
4584 msgid "Set the group owning the mount point; the default is 0 (root)."
4588 #: build/C/man7/spufs.7:57
4590 msgid "B<mode=E<lt>modeE<gt>>"
4594 #: build/C/man7/spufs.7:63
4596 "Set the mode of the top-level directory in B<spufs>, as an octal mode "
4597 "string. The default is 0775."
4601 #: build/C/man7/spufs.7:63
4607 #: build/C/man7/spufs.7:75
4609 "The files in B<spufs> mostly follow the standard behavior for regular system "
4610 "calls like B<read>(2) or B<write>(2), but often support only a subset of "
4611 "the operations supported on regular file systems. This list details the "
4612 "supported operations and the deviations from the standard behavior described "
4613 "in the respective man pages."
4617 #: build/C/man7/spufs.7:97
4619 "All files that support the B<read>(2) operation also support B<readv>(2) "
4620 "and all files that support the B<write>(2) operation also support "
4621 "B<writev>(2). All files support the B<access>(2) and B<stat>(2) family of "
4622 "operations, but for the latter call, the only fields of the returned I<stat> "
4623 "structure that contain reliable information are I<st_mode>, I<st_nlink>, "
4624 "I<st_uid>, and I<st_gid>."
4628 #: build/C/man7/spufs.7:106
4630 "All files support the B<chmod>(2)/B<fchmod>(2) and B<chown>(2)/B<fchown>(2) "
4631 "operations, but will not be able to grant permissions that contradict the "
4632 "possible operations (e.g., read access on the I<wbox> file)."
4636 #: build/C/man7/spufs.7:108
4637 msgid "The current set of files is:"
4641 #: build/C/man7/spufs.7:108
4643 msgid "I</capabilities>"
4647 #: build/C/man7/spufs.7:113
4649 "Contains a comma-delimited string representing the capabilities of this SPU "
4650 "context. Possible capabilities are:"
4654 #: build/C/man7/spufs.7:114
4660 #: build/C/man7/spufs.7:117
4661 msgid "This context may be scheduled."
4665 #: build/C/man7/spufs.7:117
4671 #: build/C/man7/spufs.7:120
4672 msgid "This context can be run in single-step mode, for debugging."
4676 #: build/C/man7/spufs.7:122
4677 msgid "New capabilities flags may be added in the future."
4681 #: build/C/man7/spufs.7:123
4687 #: build/C/man7/spufs.7:132
4689 "the contents of the local storage memory of the SPU. This can be accessed "
4690 "like a regular shared memory file and contains both code and data in the "
4691 "address space of the SPU. The possible operations on an open I<mem> file "
4696 #: build/C/man7/spufs.7:133
4698 msgid "B<read>(2), B<pread>(2), B<write>(2), B<pwrite>(2), B<lseek>(2)"
4702 #: build/C/man7/spufs.7:144
4704 "These operate as usual, with the exception that B<lseek>(2), B<write>(2), "
4705 "and B<pwrite>(2) are not supported beyond the end of the file. The file "
4706 "size is the size of the local storage of the SPU, which is normally 256 "
4711 #: build/C/man7/spufs.7:144 build/C/man7/spufs.7:706 build/C/man7/spufs.7:725
4717 #: build/C/man7/spufs.7:153
4719 "Mapping I<mem> into the process address space provides access to the SPU "
4720 "local storage within the process address space. Only B<MAP_SHARED> mappings "
4725 #: build/C/man7/spufs.7:154
4731 #: build/C/man7/spufs.7:161
4733 "Contains the saved general-purpose registers of the SPU context. This file "
4734 "contains the 128-bit values of each register, from register 0 to register "
4735 "127, in order. This allows the general-purpose registers to be inspected "
4740 #: build/C/man7/spufs.7:165
4742 "Reading to or writing from this file requires that the context is scheduled "
4743 "out, so use of this file is not recommended in normal program operation."
4747 #: build/C/man7/spufs.7:171
4749 "The I<regs> file is not present on contexts that have been created with the "
4750 "B<SPU_CREATE_NOSCHED> flag."
4754 #: build/C/man7/spufs.7:171
4760 #: build/C/man7/spufs.7:181
4762 "The first SPU-to-CPU communication mailbox. This file is read-only and can "
4763 "be read in units of 4 bytes. The file can be used only in nonblocking mode "
4764 "- even B<poll>(2) cannot be used to block on this file. The only possible "
4765 "operation on an open I<mbox> file is:"
4769 #: 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
4775 #: build/C/man7/spufs.7:200
4777 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4778 "to B<EINVAL>. If there is no data available in the mailbox (i.e., the SPU "
4779 "has not sent a mailbox message), the return value is set to -1 and I<errno> "
4780 "is set to B<EAGAIN>. When data has been read successfully, four bytes are "
4781 "placed in the data buffer and the value four is returned."
4785 #: build/C/man7/spufs.7:201
4791 #: build/C/man7/spufs.7:217
4793 "The second SPU-to-CPU communication mailbox. This file is similar to the "
4794 "first mailbox file, but can be read in blocking I/O mode, thus calling "
4795 "B<read>(2) on an open I<ibox> file will block until the SPU has written "
4796 "data to its interrupt mailbox channel (unless the file has been opened with "
4797 "B<O_NONBLOCK>, see below). Also, B<poll>(2) and similar system calls can "
4798 "be used to monitor for the presence of mailbox data."
4802 #: build/C/man7/spufs.7:221
4803 msgid "The possible operations on an open I<ibox> file are:"
4807 #: build/C/man7/spufs.7:239
4809 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4810 "to B<EINVAL>. If there is no data available in the mailbox and the file "
4811 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4812 "and I<errno> is set to B<EAGAIN>."
4816 #: build/C/man7/spufs.7:247
4818 "If there is no data available in the mailbox and the file descriptor has "
4819 "been opened without B<O_NONBLOCK>, the call will block until the SPU writes "
4820 "to its interrupt mailbox channel. When data has been read successfully, "
4821 "four bytes are placed in the data buffer and the value four is returned."
4825 #: build/C/man7/spufs.7:247 build/C/man7/spufs.7:295 build/C/man7/spufs.7:685
4831 #: build/C/man7/spufs.7:254
4833 "Poll on the I<ibox> file returns I<(POLLIN | POLLRDNORM)> whenever data is "
4834 "available for reading."
4838 #: build/C/man7/spufs.7:255
4844 #: build/C/man7/spufs.7:267
4846 "The CPU-to-SPU communication mailbox. It is write-only and can be written "
4847 "in units of four bytes. If the mailbox is full, B<write>(2) will block, "
4848 "and B<poll>(2) can be used to block until the mailbox is available for "
4849 "writing again. The possible operations on an open I<wbox> file are:"
4853 #: 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
4859 #: build/C/man7/spufs.7:286
4861 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
4862 "to B<EINVAL>. If there is no space available in the mailbox and the file "
4863 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4864 "and I<errno> is set to B<EAGAIN>."
4868 #: build/C/man7/spufs.7:295
4870 "If there is no space available in the mailbox and the file descriptor has "
4871 "been opened without B<O_NONBLOCK>, the call will block until the SPU reads "
4872 "from its PPE (PowerPC Processing Element) mailbox channel. When data has "
4873 "been written successfully, the system call returns four as its function "
4878 #: build/C/man7/spufs.7:302
4880 "A poll on the I<wbox> file returns I<(POLLOUT | POLLWRNORM)> whenever space "
4881 "is available for writing."
4885 #: build/C/man7/spufs.7:303
4887 msgid "I</mbox_stat>, I</ibox_stat>, I</wbox_stat>"
4891 #: build/C/man7/spufs.7:316
4893 "These are read-only files that contain the length of the current queue of "
4894 "each mailbox, i.e., how many words can be read from I<mbox> or I<ibox> or "
4895 "how many words can be written to I<wbox> without blocking. The files can be "
4896 "read only in four-byte units and return a big-endian binary integer number. "
4897 "The only possible operation on an open I<*box_stat> file is:"
4901 #: build/C/man7/spufs.7:337
4903 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4904 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer. "
4905 "This value is the number of elements that can be read from (for I<mbox_stat> "
4906 "and I<ibox_stat>) or written to (for I<wbox_stat>) the respective mailbox "
4907 "without blocking or returning an B<EAGAIN> error."
4911 #: build/C/man7/spufs.7:338
4914 "I</npc>, I</decr>, I</decr_status>, I</spu_tag_mask>, I</event_mask>, "
4915 "I</event_status>, I</srr0>, I</lslr>"
4919 #: build/C/man7/spufs.7:350
4921 "Internal registers of the SPU. These files contain an ASCII string "
4922 "representing the hex value of the specified register. Reads and writes on "
4923 "these files (except for I<npc>, see below) require that the SPU context be "
4924 "scheduled out, so frequent access to these files is not recommended for "
4925 "normal program operation."
4929 #: build/C/man7/spufs.7:352
4930 msgid "The contents of these files are:"
4934 #: build/C/man7/spufs.7:353
4940 #: build/C/man7/spufs.7:356
4941 msgid "Next Program Counter - valid only when the SPU is in a stopped state."
4945 #: build/C/man7/spufs.7:356
4951 #: build/C/man7/spufs.7:359
4952 msgid "SPU Decrementer"
4956 #: build/C/man7/spufs.7:359
4958 msgid "I<decr_status>"
4962 #: build/C/man7/spufs.7:362
4963 msgid "Decrementer Status"
4967 #: build/C/man7/spufs.7:362
4969 msgid "I<spu_tag_mask>"
4973 #: build/C/man7/spufs.7:365
4974 msgid "MFC tag mask for SPU DMA"
4978 #: build/C/man7/spufs.7:365
4980 msgid "I<event_mask>"
4984 #: build/C/man7/spufs.7:368
4985 msgid "Event mask for SPU interrupts"
4989 #: build/C/man7/spufs.7:368
4991 msgid "I<event_status>"
4995 #: build/C/man7/spufs.7:371
4996 msgid "Number of SPU events pending (read-only)"
5000 #: build/C/man7/spufs.7:371
5006 #: build/C/man7/spufs.7:374
5007 msgid "Interrupt Return address register"
5011 #: build/C/man7/spufs.7:374
5017 #: build/C/man7/spufs.7:377
5018 msgid "Local Store Limit Register"
5022 #: build/C/man7/spufs.7:380
5023 msgid "The possible operations on these files are:"
5027 #: build/C/man7/spufs.7:388
5029 "Reads the current register value. If the register value is larger than the "
5030 "buffer passed to the B<read>(2) system call, subsequent reads will continue "
5031 "reading from the same buffer, until the end of the buffer is reached."
5035 #: build/C/man7/spufs.7:392
5037 "When a complete string has been read, all subsequent read operations will "
5038 "return zero bytes and a new file descriptor needs to be opened to read a new "
5043 #: build/C/man7/spufs.7:402 build/C/man7/spufs.7:537
5045 "A B<write>(2) operation on the file sets the register to the value given in "
5046 "the string. The string is parsed from the beginning until the first "
5047 "nonnumeric character or the end of the buffer. Subsequent writes to the "
5048 "same file descriptor overwrite the previous setting."
5052 #: build/C/man7/spufs.7:409
5054 "Except for the I<npc> file, these files are not present on contexts that "
5055 "have been created with the B<SPU_CREATE_NOSCHED> flag."
5059 #: build/C/man7/spufs.7:410
5065 #: build/C/man7/spufs.7:417
5067 "This file provides access to the Floating Point Status and Control Register "
5068 "(fcpr) as a binary, four-byte file. The operations on the I<fpcr> file are:"
5072 #: build/C/man7/spufs.7:432
5074 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5075 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5076 "this is the current value of the I<fpcr> register."
5080 #: build/C/man7/spufs.7:446
5082 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5083 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5084 "updating the value of the I<fpcr> register."
5088 #: build/C/man7/spufs.7:447
5090 msgid "I</signal1>, I</signal2>"
5094 #: build/C/man7/spufs.7:462
5096 "The files provide access to the two signal notification channels of an SPU. "
5097 "These are read-write files that operate on four-byte words. Writing to one "
5098 "of these files triggers an interrupt on the SPU. The value written to the "
5099 "signal files can be read from the SPU through a channel read or from host "
5100 "user space through the file. After the value has been read by the SPU, it "
5101 "is reset to zero. The possible operations on an open I<signal1> or "
5102 "I<signal2> file are:"
5106 #: build/C/man7/spufs.7:476
5108 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5109 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5110 "this is the current value of the specified signal notification register."
5114 #: build/C/man7/spufs.7:497
5116 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5117 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5118 "updating the value of the specified signal notification register. The "
5119 "signal notification register will either be replaced with the input data or "
5120 "will be updated to the bitwise OR operation of the old value and the input "
5121 "data, depending on the contents of the I<signal1_type> or I<signal2_type> "
5122 "files respectively."
5126 #: build/C/man7/spufs.7:498
5128 msgid "I</signal1_type>, I</signal2_type>"
5132 #: build/C/man7/spufs.7:516
5134 "These two files change the behavior of the I<signal1> and I<signal2> "
5135 "notification files. They contain a numeric ASCII string which is read as "
5136 "either \"1\" or \"0\". In mode 0 (overwrite), the hardware replaces the "
5137 "contents of the signal channel with the data that is written to it. In mode "
5138 "1 (logical OR), the hardware accumulates the bits that are subsequently "
5139 "written to it. The possible operations on an open I<signal1_type> or "
5140 "I<signal2_type> file are:"
5144 #: build/C/man7/spufs.7:527
5146 "When the count supplied to the B<read>(2) call is shorter than the required "
5147 "length for the digit (plus a newline character), subsequent reads from the "
5148 "same file descriptor will complete the string. When a complete string has "
5149 "been read, all subsequent read operations will return zero bytes and a new "
5150 "file descriptor needs to be opened to read the value again."
5154 #: build/C/man7/spufs.7:538
5156 msgid "I</mbox_info>, I</ibox_info>, I</wbox_info>, I</dma_into>, I</proxydma_info>"
5160 #: build/C/man7/spufs.7:557
5162 "Read-only files that contain the saved state of the SPU mailboxes and DMA "
5163 "queues. This allows the SPU status to be inspected, mainly for debugging. "
5164 "The I<mbox_info> and I<ibox_info> files each contain the four-byte mailbox "
5165 "message that has been written by the SPU. If no message has been written to "
5166 "these mailboxes, then contents of these files is undefined. The "
5167 "I<mbox_stat>, I<ibox_stat> and I<wbox_stat> files contain the available "
5172 #: build/C/man7/spufs.7:566
5174 "The I<wbox_info> file contains an array of four-byte mailbox messages, which "
5175 "have been sent to the SPU. With current CBEA machines, the array is four "
5176 "items in length, so up to 4 * 4 = 16 bytes can be read from this file. If "
5177 "any mailbox queue entry is empty, then the bytes read at the corresponding "
5178 "location are undefined."
5182 #: build/C/man7/spufs.7:571
5184 "The I<dma_info> file contains the contents of the SPU MFC DMA queue, "
5185 "represented as the following structure:"
5189 #: build/C/man7/spufs.7:582
5192 "struct spu_dma_info {\n"
5193 " uint64_t dma_info_type;\n"
5194 " uint64_t dma_info_mask;\n"
5195 " uint64_t dma_info_status;\n"
5196 " uint64_t dma_info_stall_and_notify;\n"
5197 " uint64_t dma_info_atomic_command_status;\n"
5198 " struct mfc_cq_sr dma_info_command_data[16];\n"
5203 #: build/C/man7/spufs.7:590
5205 "The last member of this data structure is the actual DMA queue, containing "
5206 "16 entries. The I<mfc_cq_sr> structure is defined as:"
5210 #: build/C/man7/spufs.7:599
5213 "struct mfc_cq_sr {\n"
5214 " uint64_t mfc_cq_data0_RW;\n"
5215 " uint64_t mfc_cq_data1_RW;\n"
5216 " uint64_t mfc_cq_data2_RW;\n"
5217 " uint64_t mfc_cq_data3_RW;\n"
5222 #: build/C/man7/spufs.7:607
5224 "The I<proxydma_info> file contains similar information, but describes the "
5225 "proxy DMA queue (i.e., DMAs initiated by entities outside the SPU) instead. "
5226 "The file is in the following format:"
5230 #: build/C/man7/spufs.7:616
5233 "struct spu_proxydma_info {\n"
5234 " uint64_t proxydma_info_type;\n"
5235 " uint64_t proxydma_info_mask;\n"
5236 " uint64_t proxydma_info_status;\n"
5237 " struct mfc_cq_sr proxydma_info_command_data[8];\n"
5242 #: build/C/man7/spufs.7:622
5244 "Accessing these files requires that the SPU context is scheduled out - "
5245 "frequent use can be inefficient. These files should not be used for normal "
5246 "program operation."
5250 #: build/C/man7/spufs.7:626
5252 "These files are not present on contexts that have been created with the "
5253 "B<SPU_CREATE_NOSCHED> flag."
5257 #: build/C/man7/spufs.7:626
5263 #: build/C/man7/spufs.7:631
5265 "This file provides access to the SPU Run Control and SPU status registers, "
5266 "as an ASCII string. The following operations are supported:"
5270 #: build/C/man7/spufs.7:638
5272 "Reads from the I<cntl> file will return an ASCII string with the hex value "
5273 "of the SPU Status register."
5277 #: build/C/man7/spufs.7:643
5278 msgid "Writes to the I<cntl> file will set the context's SPU Run Control register."
5282 #: build/C/man7/spufs.7:644
5288 #: build/C/man7/spufs.7:651
5290 "Provides access to the Memory Flow Controller of the SPU. Reading from the "
5291 "file returns the contents of the SPU's MFC Tag Status register, and writing "
5292 "to the file initiates a DMA from the MFC. The following operations are "
5297 #: build/C/man7/spufs.7:656
5299 "Writes to this file need to be in the format of a MFC DMA command, defined "
5304 #: build/C/man7/spufs.7:668
5307 "struct mfc_dma_command {\n"
5308 " int32_t pad; /* reserved */\n"
5309 " uint32_t lsa; /* local storage address */\n"
5310 " uint64_t ea; /* effective address */\n"
5311 " uint16_t size; /* transfer size */\n"
5312 " uint16_t tag; /* command tag */\n"
5313 " uint16_t class; /* class ID */\n"
5314 " uint16_t cmd; /* command opcode */\n"
5319 #: build/C/man7/spufs.7:676
5321 "Writes are required to be exactly I<sizeof(struct mfc_dma_command)> bytes in "
5322 "size. The command will be sent to the SPU's MFC proxy queue, and the tag "
5323 "stored in the kernel (see below)."
5327 #: build/C/man7/spufs.7:685
5329 "Reads the contents of the tag status register. If the file is opened in "
5330 "blocking mode (i.e., without B<O_NONBLOCK>), then the read will block until "
5331 "a DMA tag (as performed by a previous write) is complete. In nonblocking "
5332 "mode, the MFC tag status register will be returned without waiting."
5336 #: build/C/man7/spufs.7:698
5338 "Calling B<poll>(2) on the I<mfc> file will block until a new DMA can be "
5339 "started (by checking for B<POLLOUT>) or until a previously started DMA (by "
5340 "checking for B<POLLIN>) has been completed."
5344 #: build/C/man7/spufs.7:704
5346 "I</mss> Provides access to the MFC MultiSource Synchronization (MSS) "
5347 "facility. By B<mmap>(2)-ing this file, processes can access the MSS area of "
5352 #: build/C/man7/spufs.7:706 build/C/man7/spufs.7:724
5353 msgid "The following operations are supported:"
5357 #: build/C/man7/spufs.7:715
5359 "Mapping B<mss> into the process address space gives access to the SPU MSS "
5360 "area within the process address space. Only B<MAP_SHARED> mappings are "
5365 #: build/C/man7/spufs.7:716
5371 #: build/C/man7/spufs.7:722
5373 "Provides access to the whole problem-state mapping of the SPU. Applications "
5374 "can use this area to interface to the SPU, rather than writing to individual "
5375 "register files in B<spufs>."
5379 #: build/C/man7/spufs.7:733
5381 "Mapping B<psmap> gives a process a direct map of the SPU problem state "
5382 "area. Only B<MAP_SHARED> mappings are supported."
5386 #: build/C/man7/spufs.7:734
5392 #: build/C/man7/spufs.7:740
5394 "Read-only file containing the physical SPU number that the SPU context is "
5395 "running on. When the context is not running, this file contains the string "
5400 #: build/C/man7/spufs.7:742
5401 msgid "The physical SPU number is given by an ASCII hex string."
5405 #: build/C/man7/spufs.7:742
5407 msgid "I</object-id>"
5411 #: build/C/man7/spufs.7:748
5413 "Allows applications to store (or retrieve) a single 64-bit ID into the "
5414 "context. This ID is later used by profiling tools to uniquely identify the "
5419 #: build/C/man7/spufs.7:754
5421 "By writing an ASCII hex value into this file, applications can set the "
5422 "object ID of the SPU context. Any previous value of the object ID is "
5427 #: build/C/man7/spufs.7:758
5429 "Reading this file gives an ASCII hex string representing the object ID for "
5434 #: build/C/man7/spufs.7:760
5436 msgid "I</etc/fstab> entry"
5440 #. Arnd Bergmann <arndb@de.ibm.com>, Mark Nutter <mnutter@us.ibm.com>,
5441 #. Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Jeremy Kerr <jk@ozlabs.org>
5443 #: build/C/man7/spufs.7:766
5444 msgid "none \t/spu \tspufs \tgid=spu \t0\t0"
5448 #: build/C/man7/spufs.7:771
5449 msgid "B<close>(2), B<spu_create>(2), B<spu_run>(2), B<capabilities>(7)"
5453 #: build/C/man7/spufs.7:773
5454 msgid "I<The Cell Broadband Engine Architecture (CBEA) specification>"
5458 #: build/C/man2/stat.2:40
5464 #: build/C/man2/stat.2:40
5470 #: build/C/man2/stat.2:43
5471 msgid "stat, fstat, lstat - get file status"
5475 #: build/C/man2/stat.2:45
5476 msgid "B<#include E<lt>sys/types.hE<gt>>"
5480 #: build/C/man2/stat.2:47
5481 msgid "B<#include E<lt>sys/stat.hE<gt>>"
5485 #: build/C/man2/stat.2:49
5486 msgid "B<#include E<lt>unistd.hE<gt>>"
5490 #: build/C/man2/stat.2:51
5491 msgid "B<int stat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5495 #: build/C/man2/stat.2:53
5496 msgid "B<int fstat(int >I<fd>B<, struct stat *>I<buf>B<);>"
5500 #: build/C/man2/stat.2:55
5501 msgid "B<int lstat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5505 #: build/C/man2/stat.2:64
5510 #: build/C/man2/stat.2:67
5512 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5513 "_XOPEN_SOURCE_EXTENDED"
5517 #: build/C/man2/stat.2:69
5518 msgid "|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5522 #: build/C/man2/stat.2:83
5524 "These functions return information about a file. No permissions are "
5525 "required on the file itself, but\\(emin the case of B<stat>() and "
5526 "B<lstat>() \\(em execute (search) permission is required on all of the "
5527 "directories in I<path> that lead to the file."
5531 #: build/C/man2/stat.2:89
5532 msgid "B<stat>() stats the file pointed to by I<path> and fills in I<buf>."
5536 #: build/C/man2/stat.2:97
5538 "B<lstat>() is identical to B<stat>(), except that if I<path> is a symbolic "
5539 "link, then the link itself is stat-ed, not the file that it refers to."
5543 #: build/C/man2/stat.2:103
5545 "B<fstat>() is identical to B<stat>(), except that the file to be stat-ed is "
5546 "specified by the file descriptor I<fd>."
5550 #: build/C/man2/stat.2:107
5552 "All of these system calls return a I<stat> structure, which contains the "
5557 #: build/C/man2/stat.2:125
5561 " dev_t st_dev; /* ID of device containing file */\n"
5562 " ino_t st_ino; /* inode number */\n"
5563 " mode_t st_mode; /* protection */\n"
5564 " nlink_t st_nlink; /* number of hard links */\n"
5565 " uid_t st_uid; /* user ID of owner */\n"
5566 " gid_t st_gid; /* group ID of owner */\n"
5567 " dev_t st_rdev; /* device ID (if special file) */\n"
5568 " off_t st_size; /* total size, in bytes */\n"
5569 " blksize_t st_blksize; /* blocksize for file system I/O */\n"
5570 " blkcnt_t st_blocks; /* number of 512B blocks allocated */\n"
5571 " time_t st_atime; /* time of last access */\n"
5572 " time_t st_mtime; /* time of last modification */\n"
5573 " time_t st_ctime; /* time of last status change */\n"
5578 #: build/C/man2/stat.2:136
5580 "The I<st_dev> field describes the device on which this file resides. (The "
5581 "B<major>(3) and B<minor>(3) macros may be useful to decompose the device "
5582 "ID in this field.)"
5586 #: build/C/man2/stat.2:140
5587 msgid "The I<st_rdev> field describes the device that this file (inode) represents."
5591 #: build/C/man2/stat.2:147
5593 "The I<st_size> field gives the size of the file (if it is a regular file or "
5594 "a symbolic link) in bytes. The size of a symbolic link is the length of the "
5595 "pathname it contains, without a terminating null byte."
5599 #: build/C/man2/stat.2:154
5601 "The I<st_blocks> field indicates the number of blocks allocated to the file, "
5602 "512-byte units. (This may be smaller than I<st_size>/512 when the file has "
5607 #: build/C/man2/stat.2:160
5609 "The I<st_blksize> field gives the \"preferred\" blocksize for efficient file "
5610 "system I/O. (Writing to a file in smaller chunks may cause an inefficient "
5611 "read-modify-rewrite.)"
5615 #: build/C/man2/stat.2:181
5617 "Not all of the Linux file systems implement all of the time fields. Some "
5618 "file system types allow mounting in such a way that file and/or directory "
5619 "accesses do not cause an update of the I<st_atime> field. (See I<noatime>, "
5620 "I<nodiratime>, and I<relatime> in B<mount>(8), and related information in "
5621 "B<mount>(2).) In addition, I<st_atime> is not updated if a file is opened "
5622 "with the B<O_NOATIME>; see B<open>(2)."
5626 #: build/C/man2/stat.2:196
5628 "The field I<st_atime> is changed by file accesses, for example, by "
5629 "B<execve>(2), B<mknod>(2), B<pipe>(2), B<utime>(2) and B<read>(2) (of more "
5630 "than zero bytes). Other routines, like B<mmap>(2), may or may not update "
5635 #: build/C/man2/stat.2:215
5637 "The field I<st_mtime> is changed by file modifications, for example, by "
5638 "B<mknod>(2), B<truncate>(2), B<utime>(2) and B<write>(2) (of more than "
5639 "zero bytes). Moreover, I<st_mtime> of a directory is changed by the "
5640 "creation or deletion of files in that directory. The I<st_mtime> field is "
5641 "I<not> changed for changes in owner, group, hard link count, or mode."
5645 #: build/C/man2/stat.2:220
5647 "The field I<st_ctime> is changed by writing or by setting inode information "
5648 "(i.e., owner, group, link count, mode, etc.)."
5652 #: build/C/man2/stat.2:224
5654 "The following POSIX macros are defined to check the file type using the "
5659 #: build/C/man2/stat.2:225
5661 msgid "B<S_ISREG>(m)"
5665 #: build/C/man2/stat.2:228
5666 msgid "is it a regular file?"
5670 #: build/C/man2/stat.2:228
5672 msgid "B<S_ISDIR>(m)"
5676 #: build/C/man2/stat.2:231
5681 #: build/C/man2/stat.2:231
5683 msgid "B<S_ISCHR>(m)"
5687 #: build/C/man2/stat.2:234
5688 msgid "character device?"
5692 #: build/C/man2/stat.2:234
5694 msgid "B<S_ISBLK>(m)"
5698 #: build/C/man2/stat.2:237
5699 msgid "block device?"
5703 #: build/C/man2/stat.2:237
5705 msgid "B<S_ISFIFO>(m)"
5709 #: build/C/man2/stat.2:240
5710 msgid "FIFO (named pipe)?"
5714 #: build/C/man2/stat.2:240
5716 msgid "B<S_ISLNK>(m)"
5720 #: build/C/man2/stat.2:243
5721 msgid "symbolic link? (Not in POSIX.1-1996.)"
5725 #: build/C/man2/stat.2:243
5727 msgid "B<S_ISSOCK>(m)"
5731 #: build/C/man2/stat.2:246
5732 msgid "socket? (Not in POSIX.1-1996.)"
5736 #: build/C/man2/stat.2:251
5737 msgid "The following flags are defined for the I<st_mode> field:"
5741 #: build/C/man2/stat.2:254
5743 msgid "S_IFMT\t0170000\tbit mask for the file type bit fields\n"
5747 #: build/C/man2/stat.2:255
5749 msgid "S_IFSOCK\t0140000\tsocket\n"
5753 #: build/C/man2/stat.2:256
5755 msgid "S_IFLNK\t0120000\tsymbolic link\n"
5759 #: build/C/man2/stat.2:257
5761 msgid "S_IFREG\t0100000\tregular file\n"
5765 #: build/C/man2/stat.2:258
5767 msgid "S_IFBLK\t0060000\tblock device\n"
5771 #: build/C/man2/stat.2:259
5773 msgid "S_IFDIR\t0040000\tdirectory\n"
5777 #: build/C/man2/stat.2:260
5779 msgid "S_IFCHR\t0020000\tcharacter device\n"
5783 #: build/C/man2/stat.2:261
5785 msgid "S_IFIFO\t0010000\tFIFO\n"
5789 #: build/C/man2/stat.2:262
5791 msgid "S_ISUID\t0004000\tset-user-ID bit\n"
5795 #: build/C/man2/stat.2:263
5797 msgid "S_ISGID\t0002000\tset-group-ID bit (see below)\n"
5801 #: build/C/man2/stat.2:264
5803 msgid "S_ISVTX\t0001000\tsticky bit (see below)\n"
5807 #: build/C/man2/stat.2:265
5809 msgid "S_IRWXU\t00700\tmask for file owner permissions\n"
5813 #: build/C/man2/stat.2:266
5815 msgid "S_IRUSR\t00400\towner has read permission\n"
5819 #: build/C/man2/stat.2:267
5821 msgid "S_IWUSR\t00200\towner has write permission\n"
5825 #: build/C/man2/stat.2:268
5827 msgid "S_IXUSR\t00100\towner has execute permission\n"
5831 #: build/C/man2/stat.2:269
5833 msgid "S_IRWXG\t00070\tmask for group permissions\n"
5837 #: build/C/man2/stat.2:270
5839 msgid "S_IRGRP\t00040\tgroup has read permission\n"
5843 #: build/C/man2/stat.2:271
5845 msgid "S_IWGRP\t00020\tgroup has write permission\n"
5849 #: build/C/man2/stat.2:272
5851 msgid "S_IXGRP\t00010\tgroup has execute permission\n"
5855 #: build/C/man2/stat.2:273
5857 msgid "S_IRWXO\t00007\tmask for permissions for others (not in group)\n"
5861 #: build/C/man2/stat.2:274
5863 msgid "S_IROTH\t00004\tothers have read permission\n"
5867 #: build/C/man2/stat.2:275
5869 msgid "S_IWOTH\t00002\tothers have write permission\n"
5873 #: build/C/man2/stat.2:276
5875 msgid "S_IXOTH\t00001\tothers have execute permission\n"
5879 #: build/C/man2/stat.2:293
5881 "The set-group-ID bit (B<S_ISGID>) has several special uses. For a "
5882 "directory it indicates that BSD semantics is to be used for that directory: "
5883 "files created there inherit their group ID from the directory, not from the "
5884 "effective group ID of the creating process, and directories created there "
5885 "will also get the B<S_ISGID> bit set. For a file that does not have the "
5886 "group execution bit (B<S_IXGRP>) set, the set-group-ID bit indicates "
5887 "mandatory file/record locking."
5891 #: build/C/man2/stat.2:300
5893 "The sticky bit (B<S_ISVTX>) on a directory means that a file in that "
5894 "directory can be renamed or deleted only by the owner of the file, by the "
5895 "owner of the directory, and by a privileged process."
5899 #: build/C/man2/stat.2:313
5901 "Search permission is denied for one of the directories in the path prefix of "
5902 "I<path>. (See also B<path_resolution>(7).)"
5906 #: build/C/man2/stat.2:317
5907 msgid "I<fd> is bad."
5911 #: build/C/man2/stat.2:320
5912 msgid "Bad address."
5916 #: build/C/man2/stat.2:323
5917 msgid "Too many symbolic links encountered while traversing the path."
5921 #: build/C/man2/stat.2:327
5922 msgid "I<path> is too long."
5926 #: build/C/man2/stat.2:334
5927 msgid "A component of I<path> does not exist, or I<path> is an empty string."
5931 #: build/C/man2/stat.2:337
5932 msgid "Out of memory (i.e., kernel memory)."
5936 #: build/C/man2/stat.2:342
5937 msgid "A component of the path prefix of I<path> is not a directory."
5941 #: build/C/man2/stat.2:342 build/C/man2/statfs.2:187 build/C/man3/statvfs.3:154
5943 msgid "B<EOVERFLOW>"
5947 #: build/C/man2/stat.2:361
5949 "I<path> or I<fd> refers to a file whose size, inode number, or number of "
5950 "blocks cannot be represented in, respectively, the types I<off_t>, I<ino_t>, "
5951 "or I<blkcnt_t>. This error can occur when, for example, an application "
5952 "compiled on a 32-bit platform without I<-D_FILE_OFFSET_BITS=64> calls "
5953 "B<stat>() on a file whose size exceeds I<(1E<lt>E<lt>31)-1> bytes."
5956 #. SVr4 documents additional
5958 #. error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4
5959 #. documents additional
5963 #. error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
5965 #: build/C/man2/stat.2:371
5966 msgid "These system calls conform to SVr4, 4.3BSD, POSIX.1-2001."
5970 #: build/C/man2/stat.2:385
5972 "According to POSIX.1-2001, B<lstat>() on a symbolic link need return valid "
5973 "information only in the I<st_size> field and the file-type component of the "
5974 "I<st_mode> field of the I<stat> structure. POSIX.-2008 tightens the "
5975 "specification, requiring B<lstat>() to return valid information in all "
5976 "fields except the permission bits in I<st_mode>."
5980 #: build/C/man2/stat.2:405
5982 "Use of the I<st_blocks> and I<st_blksize> fields may be less portable. "
5983 "(They were introduced in BSD. The interpretation differs between systems, "
5984 "and possibly on a single system when NFS mounts are involved.) If you need "
5985 "to obtain the definition of the I<blkcnt_t> or I<blksize_t> types from "
5986 "I<E<lt>sys/stat.hE<gt>>, then define B<_XOPEN_SOURCE> with the value 500 or "
5987 "greater (before including I<any> header files)."
5991 #: build/C/man2/stat.2:423
5993 "POSIX.1-1990 did not describe the B<S_IFMT>, B<S_IFSOCK>, B<S_IFLNK>, "
5994 "B<S_IFREG>, B<S_IFBLK>, B<S_IFDIR>, B<S_IFCHR>, B<S_IFIFO>, B<S_ISVTX> "
5995 "constants, but instead demanded the use of the macros B<S_ISDIR>(), etc. "
5996 "The B<S_IF*> constants are present in POSIX.1-2001 and later."
6000 #: build/C/man2/stat.2:431
6002 "The B<S_ISLNK>() and B<S_ISSOCK>() macros are not in POSIX.1-1996, but "
6003 "both are present in POSIX.1-2001; the former is from SVID 4, the latter from "
6008 #: build/C/man2/stat.2:441
6010 "UNIX V7 (and later systems) had B<S_IREAD>, B<S_IWRITE>, B<S_IEXEC>, where "
6011 "POSIX prescribes the synonyms B<S_IRUSR>, B<S_IWUSR>, B<S_IXUSR>."
6015 #: build/C/man2/stat.2:441
6017 msgid "Other systems"
6021 #: build/C/man2/stat.2:443
6022 msgid "Values that have been (or are) in use on various systems:"
6026 #: build/C/man2/stat.2:446
6028 msgid "hex\tname\tls\toctal\tdescription\n"
6032 #: build/C/man2/stat.2:447
6034 msgid "f000\tS_IFMT\t\t170000\tmask for file type\n"
6038 #: build/C/man2/stat.2:448
6040 msgid "0000\t\t\t000000\tT{\n"
6044 #: build/C/man2/stat.2:449
6046 msgid "SCO out-of-service inode; BSD unknown type; SVID-v2 and XPG2\n"
6050 #: build/C/man2/stat.2:450
6052 msgid "have both 0 and 0100000 for ordinary file\n"
6056 #: build/C/man2/stat.2:451 build/C/man2/stat.2:459 build/C/man2/stat.2:470 build/C/man2/stat.2:482 build/C/man2/stat.2:487 build/C/man2/stat.2:490 build/C/man2/stat.2:494
6062 #: build/C/man2/stat.2:452
6064 msgid "1000\tS_IFIFO\tp|\t010000\tFIFO (named pipe)\n"
6068 #: build/C/man2/stat.2:453
6070 msgid "2000\tS_IFCHR\tc\t020000\tcharacter special (V7)\n"
6074 #: build/C/man2/stat.2:454
6076 msgid "3000\tS_IFMPC\t\t030000\tmultiplexed character special (V7)\n"
6080 #: build/C/man2/stat.2:455
6082 msgid "4000\tS_IFDIR\td/\t040000\tdirectory (V7)\n"
6086 #: build/C/man2/stat.2:456
6088 msgid "5000\tS_IFNAM\t\t050000\tT{\n"
6092 #: build/C/man2/stat.2:457
6094 msgid "XENIX named special file with two subtypes, distinguished by\n"
6098 #: build/C/man2/stat.2:458
6100 msgid "I<st_rdev> values 1, 2\n"
6104 #: build/C/man2/stat.2:460
6106 msgid "0001\tS_INSEM\ts\t000001\tXENIX semaphore subtype of IFNAM\n"
6110 #: build/C/man2/stat.2:461
6112 msgid "0002\tS_INSHD\tm\t000002\tXENIX shared data subtype of IFNAM\n"
6116 #: build/C/man2/stat.2:462
6118 msgid "6000\tS_IFBLK\tb\t060000\tblock special (V7)\n"
6122 #: build/C/man2/stat.2:463
6124 msgid "7000\tS_IFMPB\t\t070000\tmultiplexed block special (V7)\n"
6128 #: build/C/man2/stat.2:464
6130 msgid "8000\tS_IFREG\t-\t100000\tregular (V7)\n"
6134 #: build/C/man2/stat.2:465
6136 msgid "9000\tS_IFCMP\t\t110000\tVxFS compressed\n"
6140 #: build/C/man2/stat.2:466
6142 msgid "9000\tS_IFNWK\tn\t110000\tnetwork special (HP-UX)\n"
6146 #: build/C/man2/stat.2:467
6148 msgid "a000\tS_IFLNK\tl@\t120000\tsymbolic link (BSD)\n"
6152 #: build/C/man2/stat.2:468
6154 msgid "b000\tS_IFSHAD\t\t130000\tT{\n"
6158 #: build/C/man2/stat.2:469
6160 msgid "Solaris shadow inode for ACL (not seen by user space)\n"
6164 #: build/C/man2/stat.2:471
6166 msgid "c000\tS_IFSOCK\ts=\t140000\tsocket (BSD; also \"S_IFSOC\" on VxFS)\n"
6170 #: build/C/man2/stat.2:472
6172 msgid "d000\tS_IFDOOR\tDE<gt>\t150000\tSolaris door\n"
6176 #: build/C/man2/stat.2:473
6178 msgid "e000\tS_IFWHT\tw%\t160000\tBSD whiteout (not used for inode)\n"
6182 #: build/C/man2/stat.2:474
6184 msgid "0200\tS_ISVTX\t\t001000\tT{\n"
6188 #: build/C/man2/stat.2:475
6190 msgid "sticky bit: save swapped text even after use (V7)\n"
6194 #: build/C/man2/stat.2:476 build/C/man2/stat.2:478 build/C/man2/stat.2:480 build/C/man2/stat.2:485
6200 #: build/C/man2/stat.2:477
6202 msgid "reserved (SVID-v2)\n"
6206 #: build/C/man2/stat.2:479
6208 msgid "On nondirectories: don't cache this file (SunOS)\n"
6212 #: build/C/man2/stat.2:481
6214 msgid "On directories: restricted deletion flag (SVID-v4.2)\n"
6218 #: build/C/man2/stat.2:483
6220 msgid "0400\tS_ISGID\t\t002000\tT{\n"
6224 #: build/C/man2/stat.2:484
6226 msgid "set-group-ID on execution (V7)\n"
6230 #: build/C/man2/stat.2:486
6232 msgid "for directories: use BSD semantics for propagation of GID\n"
6236 #: build/C/man2/stat.2:488
6238 msgid "0400\tS_ENFMT\t\t002000\tT{\n"
6242 #: build/C/man2/stat.2:489
6244 msgid "System V file locking enforcement (shared with S_ISGID)\n"
6248 #: build/C/man2/stat.2:491
6250 msgid "0800\tS_ISUID\t\t004000\tset-user-ID on execution (V7)\n"
6254 #: build/C/man2/stat.2:492
6256 msgid "0800\tS_CDF\t\t004000\tT{\n"
6260 #: build/C/man2/stat.2:493
6262 msgid "directory is a context dependent file (HP-UX)\n"
6266 #: build/C/man2/stat.2:499
6267 msgid "A sticky command appeared in Version 32V AT&T UNIX."
6270 #. As at kernel 2.6.25, XFS and JFS support nanosecond timestamps,
6271 #. but ext2, ext3, and Reiserfs do not.
6273 #: build/C/man2/stat.2:523
6275 "Since kernel 2.5.48, the I<stat> structure supports nanosecond resolution "
6276 "for the three file timestamp fields. Glibc exposes the nanosecond component "
6277 "of each field using names of the form I<st_atim.tv_nsec> if the "
6278 "B<_BSD_SOURCE> or B<_SVID_SOURCE> feature test macro is defined. These "
6279 "fields are specified in POSIX.1-2008, and, starting with version 2.12, glibc "
6280 "also exposes these field names if B<_POSIX_C_SOURCE> is defined with the "
6281 "value 200809L or greater, or B<_XOPEN_SOURCE> is defined with the value 700 "
6282 "or greater. If none of the aforementioned macros are defined, then the "
6283 "nanosecond values are exposed with names of the form I<st_atimensec>. On "
6284 "file systems that do not support subsecond timestamps, the nanosecond fields "
6285 "are returned with the value 0."
6289 #: build/C/man2/stat.2:530
6291 "On Linux, B<lstat>() will generally not trigger automounter action, whereas "
6292 "B<stat>() will (but see B<fstatat>(2))."
6296 #: build/C/man2/stat.2:538
6298 "For most files under the I</proc> directory, B<stat>() does not return the "
6299 "file size in the I<st_size> field; instead the field is returned with the "
6304 #: build/C/man2/stat.2:538
6306 msgid "Underlying kernel interface"
6310 #. A note from Andries Brouwer, July 2007
6312 #. > Is the story not rather more complicated for some calls like
6315 #. Yes and no, mostly no. See /usr/include/sys/stat.h .
6317 #. The idea is here not so much that syscalls change, but that
6318 #. the definitions of struct stat and of the types dev_t and mode_t change.
6319 #. This means that libc (even if it does not call the kernel
6320 #. but only calls some internal function) must know what the
6321 #. format of dev_t or of struct stat is.
6322 #. The communication between the application and libc goes via
6323 #. the include file <sys/stat.h> that defines a _STAT_VER and
6324 #. _MKNOD_VER describing the layout of the data that user space
6325 #. uses. Each (almost each) occurrence of stat() is replaced by
6326 #. an occurrence of xstat() where the first parameter of xstat()
6327 #. is this version number _STAT_VER.
6329 #. Now, also the definitions used by the kernel change.
6330 #. But glibc copes with this in the standard way, and the
6331 #. struct stat as returned by the kernel is repacked into
6332 #. the struct stat as expected by the application.
6333 #. Thus, _STAT_VER and this setup cater for the application-libc
6334 #. interface, rather than the libc-kernel interface.
6336 #. (Note that the details depend on gcc being used as c compiler.)
6338 #: build/C/man2/stat.2:590
6340 "Over time, increases in the size of the I<stat> structure have led to three "
6341 "successive versions of B<stat>(): I<sys_stat>() (slot I<__NR_oldstat>), "
6342 "I<sys_newstat>() (slot I<__NR_stat>), and I<sys_stat64()> (new in kernel "
6343 "2.4; slot I<__NR_stat64>). The glibc B<stat>() wrapper function hides "
6344 "these details from applications, invoking the most recent version of the "
6345 "system call provided by the kernel, and repacking the returned information "
6346 "if required for old binaries. Similar remarks apply for B<fstat>() and "
6351 #: build/C/man2/stat.2:596
6353 "The following program calls B<stat>() and displays selected fields in the "
6354 "returned I<stat> structure."
6358 #: build/C/man2/stat.2:603
6361 "#include E<lt>sys/types.hE<gt>\n"
6362 "#include E<lt>sys/stat.hE<gt>\n"
6363 "#include E<lt>time.hE<gt>\n"
6364 "#include E<lt>stdio.hE<gt>\n"
6365 "#include E<lt>stdlib.hE<gt>\n"
6369 #: build/C/man2/stat.2:608
6373 "main(int argc, char *argv[])\n"
6375 " struct stat sb;\n"
6379 #: build/C/man2/stat.2:613
6382 " if (argc != 2) {\n"
6383 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
6384 " exit(EXIT_FAILURE);\n"
6389 #: build/C/man2/stat.2:618
6392 " if (stat(argv[1], &sb) == -1) {\n"
6393 " perror(\"stat\");\n"
6394 " exit(EXIT_FAILURE);\n"
6399 #: build/C/man2/stat.2:620
6401 msgid " printf(\"File type: \");\n"
6405 #: build/C/man2/stat.2:631
6408 " switch (sb.st_mode & S_IFMT) {\n"
6409 " case S_IFBLK: printf(\"block device\\en\"); break;\n"
6410 " case S_IFCHR: printf(\"character device\\en\"); break;\n"
6411 " case S_IFDIR: printf(\"directory\\en\"); break;\n"
6412 " case S_IFIFO: printf(\"FIFO/pipe\\en\"); break;\n"
6413 " case S_IFLNK: printf(\"symlink\\en\"); break;\n"
6414 " case S_IFREG: printf(\"regular file\\en\"); break;\n"
6415 " case S_IFSOCK: printf(\"socket\\en\"); break;\n"
6416 " default: printf(\"unknown?\\en\"); break;\n"
6421 #: build/C/man2/stat.2:633
6423 msgid " printf(\"I-node number: %ld\\en\", (long) sb.st_ino);\n"
6427 #: build/C/man2/stat.2:636
6430 " printf(\"Mode: %lo (octal)\\en\",\n"
6431 " (unsigned long) sb.st_mode);\n"
6435 #: build/C/man2/stat.2:640
6438 " printf(\"Link count: %ld\\en\", (long) sb.st_nlink);\n"
6439 " printf(\"Ownership: UID=%ld GID=%ld\\en\",\n"
6440 " (long) sb.st_uid, (long) sb.st_gid);\n"
6444 #: build/C/man2/stat.2:647
6447 " printf(\"Preferred I/O block size: %ld bytes\\en\",\n"
6448 " (long) sb.st_blksize);\n"
6449 " printf(\"File size: %lld bytes\\en\",\n"
6450 " (long long) sb.st_size);\n"
6451 " printf(\"Blocks allocated: %lld\\en\",\n"
6452 " (long long) sb.st_blocks);\n"
6456 #: build/C/man2/stat.2:651
6459 " printf(\"Last status change: %s\", ctime(&sb.st_ctime));\n"
6460 " printf(\"Last file access: %s\", ctime(&sb.st_atime));\n"
6461 " printf(\"Last file modification: %s\", ctime(&sb.st_mtime));\n"
6465 #: build/C/man2/stat.2:664
6467 "B<access>(2), B<chmod>(2), B<chown>(2), B<fstatat>(2), B<readlink>(2), "
6468 "B<utime>(2), B<capabilities>(7), B<symlink>(7)"
6472 #: build/C/man2/statfs.2:28
6478 #: build/C/man2/statfs.2:28
6484 #: build/C/man2/statfs.2:31
6485 msgid "statfs, fstatfs - get file system statistics"
6489 #: build/C/man2/statfs.2:33
6490 msgid "B<#include E<lt>sys/vfs.hE<gt> >/* or E<lt>sys/statfs.hE<gt> */"
6494 #: build/C/man2/statfs.2:35
6495 msgid "B<int statfs(const char *>I<path>B<, struct statfs *>I<buf>B<);>"
6499 #: build/C/man2/statfs.2:37
6500 msgid "B<int fstatfs(int >I<fd>B<, struct statfs *>I<buf>B<);>"
6504 #: build/C/man2/statfs.2:47
6506 "The function B<statfs>() returns information about a mounted file system. "
6507 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6508 "is a pointer to a I<statfs> structure defined approximately as follows:"
6512 #: build/C/man2/statfs.2:55
6515 "#if __WORDSIZE == 32\t\t/* System word size */\n"
6516 "# define __SWORD_TYPE int\n"
6517 "#else /* __WORDSIZE == 64 */\n"
6518 "# define __SWORD_TYPE\t\tlong int\n"
6523 #: build/C/man2/statfs.2:70
6527 " __SWORD_TYPE f_type; /* type of file system (see below) */\n"
6528 " __SWORD_TYPE f_bsize; /* optimal transfer block size */\n"
6529 " fsblkcnt_t f_blocks; /* total data blocks in file system */\n"
6530 " fsblkcnt_t f_bfree; /* free blocks in fs */\n"
6531 " fsblkcnt_t f_bavail; /* free blocks available to\n"
6532 " unprivileged user */\n"
6533 " fsfilcnt_t f_files; /* total file nodes in file system */\n"
6534 " fsfilcnt_t f_ffree; /* free file nodes in fs */\n"
6535 " fsid_t f_fsid; /* file system id */\n"
6536 " __SWORD_TYPE f_namelen; /* maximum length of filenames */\n"
6537 " __SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */\n"
6538 " __SWORD_TYPE f_spare[5];\n"
6543 #: build/C/man2/statfs.2:72
6545 msgid "File system types:\n"
6549 #: build/C/man2/statfs.2:118
6552 " ADFS_SUPER_MAGIC 0xadf5\n"
6553 " AFFS_SUPER_MAGIC 0xADFF\n"
6554 " BEFS_SUPER_MAGIC 0x42465331\n"
6555 " BFS_MAGIC 0x1BADFACE\n"
6556 " CIFS_MAGIC_NUMBER 0xFF534D42\n"
6557 " CODA_SUPER_MAGIC 0x73757245\n"
6558 " COH_SUPER_MAGIC 0x012FF7B7\n"
6559 " CRAMFS_MAGIC 0x28cd3d45\n"
6560 " DEVFS_SUPER_MAGIC 0x1373\n"
6561 " EFS_SUPER_MAGIC 0x00414A53\n"
6562 " EXT_SUPER_MAGIC 0x137D\n"
6563 " EXT2_OLD_SUPER_MAGIC 0xEF51\n"
6564 " EXT2_SUPER_MAGIC 0xEF53\n"
6565 " EXT3_SUPER_MAGIC 0xEF53\n"
6566 " EXT4_SUPER_MAGIC 0xEF53\n"
6567 " HFS_SUPER_MAGIC 0x4244\n"
6568 " HPFS_SUPER_MAGIC 0xF995E849\n"
6569 " HUGETLBFS_MAGIC 0x958458f6\n"
6570 " ISOFS_SUPER_MAGIC 0x9660\n"
6571 " JFFS2_SUPER_MAGIC 0x72b6\n"
6572 " JFS_SUPER_MAGIC 0x3153464a\n"
6573 " MINIX_SUPER_MAGIC 0x137F /* orig. minix */\n"
6574 " MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */\n"
6575 " MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */\n"
6576 " MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */\n"
6577 " MSDOS_SUPER_MAGIC 0x4d44\n"
6578 " NCP_SUPER_MAGIC 0x564c\n"
6579 " NFS_SUPER_MAGIC 0x6969\n"
6580 " NTFS_SB_MAGIC 0x5346544e\n"
6581 " OPENPROM_SUPER_MAGIC 0x9fa1\n"
6582 " PROC_SUPER_MAGIC 0x9fa0\n"
6583 " QNX4_SUPER_MAGIC 0x002f\n"
6584 " REISERFS_SUPER_MAGIC 0x52654973\n"
6585 " ROMFS_MAGIC 0x7275\n"
6586 " SMB_SUPER_MAGIC 0x517B\n"
6587 " SYSV2_SUPER_MAGIC 0x012FF7B6\n"
6588 " SYSV4_SUPER_MAGIC 0x012FF7B5\n"
6589 " TMPFS_MAGIC 0x01021994\n"
6590 " UDF_SUPER_MAGIC 0x15013346\n"
6591 " UFS_MAGIC 0x00011954\n"
6592 " USBDEVICE_SUPER_MAGIC 0x9fa2\n"
6593 " VXFS_SUPER_MAGIC 0xa501FCF5\n"
6594 " XENIX_SUPER_MAGIC 0x012FF7B4\n"
6595 " XFS_SUPER_MAGIC 0x58465342\n"
6596 " _XIAFS_SUPER_MAGIC 0x012FD16D\n"
6600 #: build/C/man2/statfs.2:124
6601 msgid "Nobody knows what I<f_fsid> is supposed to contain (but see below)."
6605 #: build/C/man2/statfs.2:129
6607 "Fields that are undefined for a particular file system are set to 0. "
6608 "B<fstatfs>() returns the same information about an open file referenced by "
6613 #: build/C/man2/statfs.2:142
6615 "(B<statfs>()) Search permission is denied for a component of the path "
6616 "prefix of I<path>. (See also B<path_resolution>(7).)"
6620 #: build/C/man2/statfs.2:147
6621 msgid "(B<fstatfs>()) I<fd> is not a valid open file descriptor."
6625 #: build/C/man2/statfs.2:153
6626 msgid "I<buf> or I<path> points to an invalid address."
6630 #: build/C/man2/statfs.2:156 build/C/man3/statvfs.3:123
6631 msgid "This call was interrupted by a signal."
6635 #: build/C/man2/statfs.2:156 build/C/man3/statvfs.3:123
6641 #: build/C/man2/statfs.2:159 build/C/man3/statvfs.3:126
6642 msgid "An I/O error occurred while reading from the file system."
6646 #: build/C/man2/statfs.2:164
6648 "(B<statfs>()) Too many symbolic links were encountered in translating "
6653 #: build/C/man2/statfs.2:169
6654 msgid "(B<statfs>()) I<path> is too long."
6658 #: build/C/man2/statfs.2:175
6659 msgid "(B<statfs>()) The file referred to by I<path> does not exist."
6663 #: build/C/man2/statfs.2:178 build/C/man3/statvfs.3:145
6664 msgid "Insufficient kernel memory was available."
6668 #: build/C/man2/statfs.2:181 build/C/man3/statvfs.3:148
6669 msgid "The file system does not support this call."
6673 #: build/C/man2/statfs.2:187
6674 msgid "(B<statfs>()) A component of the path prefix of I<path> is not a directory."
6678 #: build/C/man2/statfs.2:190 build/C/man3/statvfs.3:157
6679 msgid "Some values were too large to be represented in the returned struct."
6683 #: build/C/man2/statfs.2:196
6685 "Linux-specific. The Linux B<statfs>() was inspired by the 4.4BSD one (but "
6686 "they do not use the same structure)."
6690 #: build/C/man2/statfs.2:218
6692 "The original Linux B<statfs>() and B<fstatfs>() system calls were not "
6693 "designed with extremely large file sizes in mind. Subsequently, Linux 2.6 "
6694 "added new B<statfs64>() and B<fstatfs64>() system calls that employ a new "
6695 "structure, I<statfs64>. The new structure contains the same fields as the "
6696 "original I<statfs> structure, but the sizes of various fields are increased, "
6697 "to accommodate large file sizes. The glibc B<statfs>() and B<fstatfs>() "
6698 "wrapper functions transparently deal with the kernel differences."
6702 #: build/C/man2/statfs.2:223
6704 "Some systems only have I<E<lt>sys/vfs.hE<gt>>, other systems also have "
6705 "I<E<lt>sys/statfs.hE<gt>>, where the former includes the latter. So it "
6706 "seems including the former is the best choice."
6710 #: build/C/man2/statfs.2:233
6712 "LSB has deprecated the library calls B<statfs>() and B<fstatfs>() and "
6713 "tells us to use B<statvfs>(2) and B<fstatvfs>(2) instead."
6717 #: build/C/man2/statfs.2:233
6719 msgid "The f_fsid field"
6723 #: build/C/man2/statfs.2:258
6725 "Solaris, Irix and POSIX have a system call B<statvfs>(2) that returns a "
6726 "I<struct statvfs> (defined in I<E<lt>sys/statvfs.hE<gt>>) containing an "
6727 "I<unsigned long> I<f_fsid>. Linux, SunOS, HP-UX, 4.4BSD have a system call "
6728 "B<statfs>() that returns a I<struct statfs> (defined in "
6729 "I<E<lt>sys/vfs.hE<gt>>) containing a I<fsid_t> I<f_fsid>, where I<fsid_t> "
6730 "is defined as I<struct { int val[2]; }>. The same holds for FreeBSD, except "
6731 "that it uses the include file I<E<lt>sys/mount.hE<gt>>."
6735 #: build/C/man2/statfs.2:271
6737 "The general idea is that I<f_fsid> contains some random stuff such that the "
6738 "pair (I<f_fsid>,I<ino>) uniquely determines a file. Some operating systems "
6739 "use (a variation on) the device number, or the device number combined with "
6740 "the file-system type. Several OSes restrict giving out the I<f_fsid> field "
6741 "to the superuser only (and zero it for unprivileged users), because this "
6742 "field is used in the filehandle of the file system when NFS-exported, and "
6743 "giving it out is a security concern."
6747 #: build/C/man2/statfs.2:277
6749 "Under some operating systems the I<fsid> can be used as second argument to "
6750 "the B<sysfs>(2) system call."
6754 #: build/C/man2/statfs.2:281
6755 msgid "B<stat>(2), B<statvfs>(2), B<path_resolution>(7)"
6759 #: build/C/man3/statvfs.3:30
6765 #: build/C/man3/statvfs.3:30
6771 #: build/C/man3/statvfs.3:33
6772 msgid "statvfs, fstatvfs - get file system statistics"
6776 #: build/C/man3/statvfs.3:35
6777 msgid "B<#include E<lt>sys/statvfs.hE<gt>>"
6781 #: build/C/man3/statvfs.3:37
6782 msgid "B<int statvfs(const char *>I<path>B<, struct statvfs *>I<buf>B<);>"
6786 #: build/C/man3/statvfs.3:39
6787 msgid "B<int fstatvfs(int >I<fd>B<, struct statvfs *>I<buf>B<);>"
6791 #: build/C/man3/statvfs.3:49
6793 "The function B<statvfs>() returns information about a mounted file system. "
6794 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6795 "is a pointer to a I<statvfs> structure defined approximately as follows:"
6799 #: build/C/man3/statvfs.3:65
6802 "struct statvfs {\n"
6803 " unsigned long f_bsize; /* file system block size */\n"
6804 " unsigned long f_frsize; /* fragment size */\n"
6805 " fsblkcnt_t f_blocks; /* size of fs in f_frsize units */\n"
6806 " fsblkcnt_t f_bfree; /* # free blocks */\n"
6807 " fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */\n"
6808 " fsfilcnt_t f_files; /* # inodes */\n"
6809 " fsfilcnt_t f_ffree; /* # free inodes */\n"
6810 " fsfilcnt_t f_favail; /* # free inodes for unprivileged users */\n"
6811 " unsigned long f_fsid; /* file system ID */\n"
6812 " unsigned long f_flag; /* mount flags */\n"
6813 " unsigned long f_namemax; /* maximum filename length */\n"
6818 #: build/C/man3/statvfs.3:76
6820 "Here the types I<fsblkcnt_t> and I<fsfilcnt_t> are defined in "
6821 "I<E<lt>sys/types.hE<gt>>. Both used to be I<unsigned long>."
6825 #: build/C/man3/statvfs.3:82
6827 "The field I<f_flag> is a bit mask (of mount flags, see B<mount>(8)). Bits "
6828 "defined by POSIX are"
6832 #: build/C/man3/statvfs.3:82
6834 msgid "B<ST_RDONLY>"
6838 #: build/C/man3/statvfs.3:85
6839 msgid "Read-only file system."
6843 #: build/C/man3/statvfs.3:85
6845 msgid "B<ST_NOSUID>"
6849 #: build/C/man3/statvfs.3:89
6850 msgid "Set-user-ID/set-group-ID bits are ignored by B<exec>(3)."
6854 #: build/C/man3/statvfs.3:92
6856 "It is unspecified whether all members of the returned struct have meaningful "
6857 "values on all file systems."
6861 #: build/C/man3/statvfs.3:96
6863 "B<fstatvfs>() returns the same information about an open file referenced by "
6868 #: build/C/man3/statvfs.3:109
6870 "(B<statvfs>()) Search permission is denied for a component of the path "
6871 "prefix of I<path>. (See also B<path_resolution>(7).)"
6875 #: build/C/man3/statvfs.3:114
6876 msgid "(B<fstatvfs>()) I<fd> is not a valid open file descriptor."
6880 #: build/C/man3/statvfs.3:120
6881 msgid "I<Buf> or I<path> points to an invalid address."
6885 #: build/C/man3/statvfs.3:131
6887 "(B<statvfs>()) Too many symbolic links were encountered in translating "
6892 #: build/C/man3/statvfs.3:136
6893 msgid "(B<statvfs>()) I<path> is too long."
6897 #: build/C/man3/statvfs.3:142
6898 msgid "(B<statvfs>()) The file referred to by I<path> does not exist."
6902 #: build/C/man3/statvfs.3:154
6904 "(B<statvfs>()) A component of the path prefix of I<path> is not a "
6909 #: build/C/man3/statvfs.3:159
6910 msgid "POSIX.1-2001."
6914 #: build/C/man3/statvfs.3:165
6916 "The Linux kernel has system calls B<statfs>(2) and B<fstatfs>(2) to "
6917 "support this library call."
6921 #: build/C/man3/statvfs.3:167
6922 msgid "The current glibc implementations of"
6926 #: build/C/man3/statvfs.3:172
6929 " pathconf(path, _PC_REC_XFER_ALIGN);\n"
6930 " pathconf(path, _PC_ALLOC_SIZE_MIN);\n"
6931 " pathconf(path, _PC_REC_MIN_XFER_SIZE);\n"
6935 #: build/C/man3/statvfs.3:181
6937 "respectively use the I<f_frsize>, I<f_frsize>, and I<f_bsize> fields of the "
6938 "return value of I<statvfs(path,buf)>."
6942 #: build/C/man3/statvfs.3:183
6943 msgid "B<statfs>(2)"
6947 #: build/C/man2/sysfs.2:27
6953 #: build/C/man2/sysfs.2:27
6959 #: build/C/man2/sysfs.2:30
6960 msgid "sysfs - get file system type information"
6964 #: build/C/man2/sysfs.2:32
6965 msgid "B<int sysfs(int >I<option>B<, const char *>I<fsname>B<);>"
6969 #: build/C/man2/sysfs.2:34
6971 "B<int sysfs(int >I<option>B<, unsigned int >I<fs_index>B<, char "
6976 #: build/C/man2/sysfs.2:36
6977 msgid "B<int sysfs(int >I<option>B<);>"
6981 #: build/C/man2/sysfs.2:45
6983 "B<sysfs>() returns information about the file system types currently "
6984 "present in the kernel. The specific form of the B<sysfs>() call and the "
6985 "information returned depends on the I<option> in effect:"
6989 #: build/C/man2/sysfs.2:45
6995 #: build/C/man2/sysfs.2:50
6997 "Translate the file-system identifier string I<fsname> into a file-system "
7002 #: build/C/man2/sysfs.2:50
7008 #: build/C/man2/sysfs.2:61
7010 "Translate the file-system type index I<fs_index> into a null-terminated "
7011 "file-system identifier string. This string will be written to the buffer "
7012 "pointed to by I<buf>. Make sure that I<buf> has enough space to accept the "
7017 #: build/C/man2/sysfs.2:61
7023 #: build/C/man2/sysfs.2:65
7025 "Return the total number of file system types currently present in the "
7030 #: build/C/man2/sysfs.2:67
7031 msgid "The numbering of the file-system type indexes begins with zero."
7035 #: build/C/man2/sysfs.2:79
7037 "On success, B<sysfs>() returns the file-system index for option B<1>, zero "
7038 "for option B<2>, and the number of currently configured file systems for "
7039 "option B<3>. On error, -1 is returned, and I<errno> is set appropriately."
7043 #: build/C/man2/sysfs.2:84
7044 msgid "Either I<fsname> or I<buf> is outside your accessible address space."
7048 #: build/C/man2/sysfs.2:92
7050 "I<fsname> is not a valid file-system type identifier; I<fs_index> is "
7051 "out-of-bounds; I<option> is invalid."
7054 #. SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
7055 #. but has no ENOSYS condition.
7057 #: build/C/man2/sysfs.2:94 build/C/man2/ustat.2:98
7062 #: build/C/man2/sysfs.2:101
7064 "This System-V derived system call is obsolete; don't use it. On systems "
7065 "with I</proc>, the same information can be obtained via "
7066 "I</proc/filesystems>; use that interface instead."
7070 #: build/C/man2/sysfs.2:101
7076 #: build/C/man2/sysfs.2:104
7078 "There is no libc or glibc support. There is no way to guess how large "
7083 #: build/C/man2/umount.2:30
7089 #: build/C/man2/umount.2:30
7095 #: build/C/man2/umount.2:33
7096 msgid "umount, umount2 - unmount file system"
7100 #: build/C/man2/umount.2:38
7102 msgid "B<int umount(const char *>I<target>B<);>\n"
7106 #: build/C/man2/umount.2:40
7108 msgid "B<int umount2(const char *>I<target>B<, int >I<flags>B<);>\n"
7111 #. Note: the kernel naming differs from the glibc naming
7112 #. umount2 is the glibc name for what the kernel now calls umount
7113 #. and umount is the glibc name for oldumount
7115 #: build/C/man2/umount.2:50
7117 "B<umount>() and B<umount2>() remove the attachment of the (topmost) file "
7118 "system mounted on I<target>."
7122 #: build/C/man2/umount.2:54
7124 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
7125 "to unmount file systems."
7129 #: build/C/man2/umount.2:62
7131 "Linux 2.1.116 added the B<umount2>() system call, which, like B<umount>(), "
7132 "unmounts a target, but allows additional I<flags> controlling the behavior "
7137 #: build/C/man2/umount.2:62
7139 msgid "B<MNT_FORCE> (since Linux 2.1.116)"
7143 #: build/C/man2/umount.2:67
7145 "Force unmount even if busy. This can cause data loss. (Only for NFS "
7150 #: build/C/man2/umount.2:67
7152 msgid "B<MNT_DETACH> (since Linux 2.4.11)"
7156 #: build/C/man2/umount.2:72
7158 "Perform a lazy unmount: make the mount point unavailable for new accesses, "
7159 "and actually perform the unmount when the mount point ceases to be busy."
7163 #: build/C/man2/umount.2:72
7165 msgid "B<MNT_EXPIRE> (since Linux 2.6.8)"
7169 #: build/C/man2/umount.2:91
7171 "Mark the mount point as expired. If a mount point is not currently in use, "
7172 "then an initial call to B<umount2>() with this flag fails with the error "
7173 "B<EAGAIN>, but marks the mount point as expired. The mount point remains "
7174 "expired as long as it isn't accessed by any process. A second B<umount2>() "
7175 "call specifying B<MNT_EXPIRE> unmounts an expired mount point. This flag "
7176 "cannot be specified with either B<MNT_FORCE> or B<MNT_DETACH>."
7180 #: build/C/man2/umount.2:91
7182 msgid "B<UMOUNT_NOFOLLOW> (since Linux 2.6.34)"
7185 #. Later added to 2.6.33-stable
7187 #: build/C/man2/umount.2:99
7189 "Don't dereference I<target> if it is a symbolic link. This flag allows "
7190 "security problems to be avoided in set-user-ID-I<root> programs that allow "
7191 "unprivileged users to unmount file systems."
7195 #: build/C/man2/umount.2:110
7197 "The error values given below result from file-system type independent "
7198 "errors. Each file system type may have its own special errors and its own "
7199 "special behavior. See the Linux kernel source code for details."
7203 #: build/C/man2/umount.2:110
7209 #: build/C/man2/umount.2:117
7211 "A call to B<umount2>() specifying B<MNT_EXPIRE> successfully marked an "
7212 "unbusy file system as expired."
7216 #: build/C/man2/umount.2:121
7217 msgid "I<target> could not be unmounted because it is busy."
7221 #: build/C/man2/umount.2:125
7222 msgid "I<target> points outside the user address space."
7226 #: build/C/man2/umount.2:137
7228 "I<target> is not a mount point. Or, B<umount2>() was called with "
7229 "B<MNT_EXPIRE> and either B<MNT_DETACH> or B<MNT_FORCE>."
7232 #. http://sourceware.org/bugzilla/show_bug.cgi?id=10092
7234 #: build/C/man2/umount.2:156
7235 msgid "B<MNT_DETACH> and B<MNT_EXPIRE> are available in glibc since version 2.11."
7239 #: build/C/man2/umount.2:159
7241 "These functions are Linux-specific and should not be used in programs "
7242 "intended to be portable."
7246 #: build/C/man2/umount.2:170
7248 "The original B<umount>() function was called as I<umount(device)> and would "
7249 "return B<ENOTBLK> when called with something other than a block device. In "
7250 "Linux 0.98p4 a call I<umount(dir)> was added, in order to support anonymous "
7251 "devices. In Linux 2.3.99-pre7 the call I<umount(device)> was removed, "
7252 "leaving only I<umount(dir)> (since now devices can be mounted in more than "
7253 "one place, so specifying the device does not suffice)."
7257 #: build/C/man2/umount.2:175
7258 msgid "B<mount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
7262 #: build/C/man2/ustat.2:30
7268 #: build/C/man2/ustat.2:30
7274 #: build/C/man2/ustat.2:33
7275 msgid "ustat - get file system statistics"
7279 #: build/C/man2/ustat.2:36
7281 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
7285 #: build/C/man2/ustat.2:38
7287 msgid "B<#include E<lt>unistd.hE<gt>> /* libc[45] */\n"
7291 #: build/C/man2/ustat.2:40
7293 msgid "B<#include E<lt>ustat.hE<gt>> /* glibc2 */\n"
7297 #: build/C/man2/ustat.2:42
7299 msgid "B<int ustat(dev_t >I<dev>B<, struct ustat *>I<ubuf>B<);>\n"
7303 #: build/C/man2/ustat.2:54
7305 "B<ustat>() returns information about a mounted file system. I<dev> is a "
7306 "device number identifying a device containing a mounted file system. "
7307 "I<ubuf> is a pointer to a I<ustat> structure that contains the following "
7312 #: build/C/man2/ustat.2:61
7315 "daddr_t f_tfree; /* Total free blocks */\n"
7316 "ino_t f_tinode; /* Number of free inodes */\n"
7317 "char f_fname[6]; /* Filsys name */\n"
7318 "char f_fpack[6]; /* Filsys pack name */\n"
7322 #: build/C/man2/ustat.2:70
7324 "The last two fields, I<f_fname> and I<f_fpack>, are not implemented and will "
7325 "always be filled with null bytes (\\(aq\\e0\\(aq)."
7329 #: build/C/man2/ustat.2:79
7331 "On success, zero is returned and the I<ustat> structure pointed to by "
7332 "I<ubuf> will be filled in. On error, -1 is returned, and I<errno> is set "
7337 #: build/C/man2/ustat.2:84
7338 msgid "I<ubuf> points outside of your accessible address space."
7342 #: build/C/man2/ustat.2:88
7343 msgid "I<dev> does not refer to a device containing a mounted file system."
7347 #: build/C/man2/ustat.2:94
7349 "The mounted file system referenced by I<dev> does not support this "
7350 "operation, or any version of Linux before 1.3.16."
7354 #: build/C/man2/ustat.2:104
7356 "B<ustat>() is deprecated and has been provided only for compatibility. All "
7357 "new programs should use B<statfs>(2) instead."
7361 #: build/C/man2/ustat.2:104
7366 #. Some software tries to use this in order to test whether the
7367 #. underlying file system is NFS.
7369 #: build/C/man2/ustat.2:118
7371 "The HP-UX version of the I<ustat> structure has an additional field, "
7372 "I<f_blksize>, that is unknown elsewhere. HP-UX warns: For some file "
7373 "systems, the number of free inodes does not change. Such file systems will "
7374 "return -1 in the field I<f_tinode>. For some file systems, inodes are "
7375 "dynamically allocated. Such file systems will return the current number of "
7380 #: build/C/man2/ustat.2:121
7381 msgid "B<stat>(2), B<statfs>(2)"