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: 2012-05-28 07:16+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:25
26 #: build/C/man5/filesystems.5:25
32 #: build/C/man5/filesystems.5:25 build/C/man3/fts.3:38 build/C/man3/ftw.3:34 build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/mount.2:40 build/C/man7/path_resolution.7:23 build/C/man2/removexattr.2:27 build/C/man2/setxattr.2:27 build/C/man2/spu_create.2:24 build/C/man2/spu_run.2:25 build/C/man7/spufs.7:26 build/C/man2/stat.2:40 build/C/man2/statfs.2:26 build/C/man3/statvfs.3:28 build/C/man2/sysfs.2:25 build/C/man2/umount.2:30 build/C/man2/ustat.2:28
38 #: build/C/man5/filesystems.5:25 build/C/man3/fts.3:38 build/C/man3/ftw.3:34 build/C/man3/getfsent.3:25 build/C/man3/getmntent.3:30 build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/mount.2:40 build/C/man7/path_resolution.7:23 build/C/man2/removexattr.2:27 build/C/man2/setxattr.2:27 build/C/man2/spu_create.2:24 build/C/man2/spu_run.2:25 build/C/man7/spufs.7:26 build/C/man2/stat.2:40 build/C/man2/statfs.2:26 build/C/man3/statvfs.3:28 build/C/man2/sysfs.2:25 build/C/man2/umount.2:30 build/C/man2/ustat.2:28
40 msgid "Linux Programmer's Manual"
44 #: build/C/man5/filesystems.5:27 build/C/man3/fts.3:39 build/C/man3/ftw.3:35 build/C/man3/getfsent.3:26 build/C/man3/getmntent.3:31 build/C/man2/getxattr.2:28 build/C/man2/listxattr.2:28 build/C/man2/mount.2:41 build/C/man7/path_resolution.7:24 build/C/man2/removexattr.2:28 build/C/man2/setxattr.2:28 build/C/man2/spu_create.2:25 build/C/man2/spu_run.2:26 build/C/man7/spufs.7:27 build/C/man2/stat.2:41 build/C/man2/statfs.2:27 build/C/man3/statvfs.3:29 build/C/man2/sysfs.2:26 build/C/man2/umount.2:31 build/C/man2/ustat.2:29
50 #: build/C/man5/filesystems.5:31
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:31 build/C/man3/fts.3:59 build/C/man3/ftw.3:54 build/C/man3/getfsent.3:40 build/C/man3/getmntent.3:63 build/C/man2/getxattr.2:44 build/C/man2/listxattr.2:43 build/C/man2/mount.2:51 build/C/man7/path_resolution.7:26 build/C/man2/removexattr.2:41 build/C/man2/setxattr.2:44 build/C/man2/spu_create.2:36 build/C/man2/spu_run.2:35 build/C/man7/spufs.7:29 build/C/man2/stat.2:72 build/C/man2/statfs.2:35 build/C/man3/statvfs.3:37 build/C/man2/sysfs.2:34 build/C/man2/umount.2:41 build/C/man2/ustat.2:41
64 #: build/C/man5/filesystems.5:41
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:46
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:48
79 msgid "Below a short description of a few of the available file systems."
83 #: build/C/man5/filesystems.5:48
89 #: build/C/man5/filesystems.5:55
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:55
104 #: build/C/man5/filesystems.5:64
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:64
118 #: build/C/man5/filesystems.5:74
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:74
134 #: build/C/man5/filesystems.5:79
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:79
147 #: build/C/man5/filesystems.5:84
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:84
161 #: build/C/man5/filesystems.5:88
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:88
174 #: build/C/man5/filesystems.5:92
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:92
187 #: build/C/man5/filesystems.5:96
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:96
200 #: build/C/man5/filesystems.5:106
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:106
215 #: build/C/man5/filesystems.5:112
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:112
229 #: build/C/man5/filesystems.5:119
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:119
244 #: build/C/man5/filesystems.5:123
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:123
257 #: build/C/man5/filesystems.5:128
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:128
271 #: build/C/man5/filesystems.5:136
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:136
285 #: build/C/man5/filesystems.5:139
286 msgid "is a CD-ROM file system type conforming to the ISO 9660 standard."
290 #: build/C/man5/filesystems.5:140
292 msgid "B<High Sierra>"
296 #: build/C/man5/filesystems.5:147
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:147
306 msgid "B<Rock Ridge>"
310 #: build/C/man5/filesystems.5:158
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:159
327 #: build/C/man5/filesystems.5:164
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:164
340 #: build/C/man5/filesystems.5:168
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:168
353 #: build/C/man5/filesystems.5:171
354 msgid "is the network file system used to access disks located on remote computers."
358 #: build/C/man5/filesystems.5:171
364 #: build/C/man5/filesystems.5:175
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:181
373 "To use B<smb> fs, you need a special mount program, which can be found in "
374 "the ksmbfs package, found at "
375 "I<ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs>."
379 #: build/C/man5/filesystems.5:181
385 #: build/C/man5/filesystems.5:185
387 "is a network file system that supports the NCP protocol, used by Novell "
392 #: build/C/man5/filesystems.5:190
394 "To use B<ncpfs>, you need special programs, which can be found at "
395 "I<ftp://linux01.gwdg.de/pub/ncpfs>."
399 #: build/C/man5/filesystems.5:190 build/C/man3/fts.3:781 build/C/man3/ftw.3:404 build/C/man3/getfsent.3:131 build/C/man3/getmntent.3:193 build/C/man2/getxattr.2:143 build/C/man2/listxattr.2:155 build/C/man2/mount.2:456 build/C/man7/path_resolution.7:229 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:153 build/C/man2/spu_create.2:265 build/C/man2/spu_run.2:259 build/C/man7/spufs.7:765 build/C/man2/stat.2:649 build/C/man2/statfs.2:275 build/C/man3/statvfs.3:179 build/C/man2/umount.2:170 build/C/man2/ustat.2:114
405 #: build/C/man5/filesystems.5:195
406 msgid "B<proc>(5), B<fsck>(8), B<mkfs>(8), B<mount>(8)"
410 #: build/C/man5/filesystems.5:195 build/C/man3/fts.3:787 build/C/man3/ftw.3:408 build/C/man3/getfsent.3:134 build/C/man3/getmntent.3:197 build/C/man2/getxattr.2:153 build/C/man2/listxattr.2:165 build/C/man2/mount.2:461 build/C/man7/path_resolution.7:234 build/C/man2/removexattr.2:120 build/C/man2/setxattr.2:163 build/C/man2/spu_create.2:270 build/C/man2/spu_run.2:264 build/C/man7/spufs.7:771 build/C/man2/stat.2:658 build/C/man2/statfs.2:279 build/C/man3/statvfs.3:181 build/C/man2/sysfs.2:102 build/C/man2/umount.2:175 build/C/man2/ustat.2:117
416 #: build/C/man5/filesystems.5:202 build/C/man3/fts.3:794 build/C/man3/ftw.3:415 build/C/man3/getfsent.3:141 build/C/man3/getmntent.3:204 build/C/man2/getxattr.2:160 build/C/man2/listxattr.2:172 build/C/man2/mount.2:468 build/C/man7/path_resolution.7:241 build/C/man2/removexattr.2:127 build/C/man2/setxattr.2:170 build/C/man2/spu_create.2:277 build/C/man2/spu_run.2:271 build/C/man7/spufs.7:778 build/C/man2/stat.2:665 build/C/man2/statfs.2:286 build/C/man3/statvfs.3:188 build/C/man2/sysfs.2:109 build/C/man2/umount.2:182 build/C/man2/ustat.2:124
418 "This page is part of release 3.41 of the Linux I<man-pages> project. A "
419 "description of the project, and information about reporting bugs, can be "
420 "found at http://www.kernel.org/doc/man-pages/."
424 #: build/C/man3/fts.3:38
430 #: build/C/man3/fts.3:38
436 #: build/C/man3/fts.3:42
438 "fts, fts_open, fts_read, fts_children, fts_set, fts_close - traverse a file "
443 #: build/C/man3/fts.3:42 build/C/man3/ftw.3:37 build/C/man3/getfsent.3:28 build/C/man3/getmntent.3:34 build/C/man2/getxattr.2:30 build/C/man2/listxattr.2:30 build/C/man2/mount.2:43 build/C/man2/removexattr.2:30 build/C/man2/setxattr.2:30 build/C/man2/spu_create.2:27 build/C/man2/spu_run.2:28 build/C/man2/stat.2:43 build/C/man2/statfs.2:29 build/C/man3/statvfs.3:31 build/C/man2/sysfs.2:28 build/C/man2/umount.2:33 build/C/man2/ustat.2:31
449 #: build/C/man3/fts.3:47
452 "B<#include E<lt>sys/types.hE<gt>>\n"
453 "B<#include E<lt>sys/stat.hE<gt>>\n"
454 "B<#include E<lt>fts.hE<gt>>\n"
458 #: build/C/man3/fts.3:50
461 "B<FTS *fts_open(char * const *>I<path_argv>B<, int >I<options>B<, >\n"
462 "B< int (*>I<compar>B<)(const FTSENT **, const FTSENT **));>\n"
466 #: build/C/man3/fts.3:52
468 msgid "B<FTSENT *fts_read(FTS *>I<ftsp>B<);>\n"
472 #: build/C/man3/fts.3:54
474 msgid "B<FTSENT *fts_children(FTS *>I<ftsp>B<, int >I<options>B<);>\n"
478 #: build/C/man3/fts.3:56
480 msgid "B<int fts_set(FTS *>I<ftsp>B<, FTSENT *>I<f>B<, int >I<options>B<);>\n"
484 #: build/C/man3/fts.3:58
486 msgid "B<int fts_close(FTS *>I<ftsp>B<);>\n"
490 #: build/C/man3/fts.3:83
492 "The fts functions are provided for traversing file hierarchies. A simple "
493 "overview is that the B<fts_open>() function returns a \"handle\" on a file "
494 "hierarchy, which is then supplied to the other fts functions. The function "
495 "B<fts_read>() returns a pointer to a structure describing one of the files "
496 "in the file hierarchy. The function B<fts_children>() returns a pointer to "
497 "a linked list of structures, each of which describes one of the files "
498 "contained in a directory in the hierarchy. In general, directories are "
499 "visited two distinguishable times; in preorder (before any of their "
500 "descendants are visited) and in postorder (after all of their descendants "
501 "have been visited). Files are visited once. It is possible to walk the "
502 "hierarchy \"logically\" (ignoring symbolic links) or physically (visiting "
503 "symbolic links), order the walk of the hierarchy or prune and/or revisit "
504 "portions of the hierarchy."
508 #: build/C/man3/fts.3:104
510 "Two structures are defined (and typedef'd) in the include file "
511 "I<E<lt>fts.hE<gt>>. The first is I<FTS>, the structure that represents the "
512 "file hierarchy itself. The second is I<FTSENT>, the structure that "
513 "represents a file in the file hierarchy. Normally, an I<FTSENT> structure "
514 "is returned for every file in the file hierarchy. In this manual page, "
515 "\"file\" and \"FTSENT structure\" are generally interchangeable. The "
516 "I<FTSENT> structure contains at least the following fields, which are "
517 "described in greater detail below:"
521 #: build/C/man3/fts.3:123
524 "typedef struct _ftsent {\n"
525 " unsigned short fts_info; /* flags for FTSENT structure */\n"
526 " char *fts_accpath; /* access path */\n"
527 " char *fts_path; /* root path */\n"
528 " short fts_pathlen; /* strlen(fts_path) */\n"
529 " char *fts_name; /* filename */\n"
530 " short fts_namelen; /* strlen(fts_name) */\n"
531 " short fts_level; /* depth (-1 to N) */\n"
532 " int fts_errno; /* file errno */\n"
533 " long fts_number; /* local numeric value */\n"
534 " void *fts_pointer; /* local address value */\n"
535 " struct ftsent *fts_parent; /* parent directory */\n"
536 " struct ftsent *fts_link; /* next file structure */\n"
537 " struct ftsent *fts_cycle; /* cycle structure */\n"
538 " struct stat *fts_statp; /* stat(2) information */\n"
542 #. .Bl -tag -width "fts_namelen"
544 #: build/C/man3/fts.3:128
545 msgid "These fields are defined as follows:"
549 #: build/C/man3/fts.3:128
554 #. .Bl -tag -width FTS_DEFAULT
556 #: build/C/man3/fts.3:140
558 "One of the following flags describing the returned I<FTSENT> structure and "
559 "the file it represents. With the exception of directories without errors "
560 "(B<FTS_D>), all of these entries are terminal, that is, they will not be "
561 "revisited, nor will any of their descendants be visited."
565 #: build/C/man3/fts.3:141
571 #: build/C/man3/fts.3:144
572 msgid "A directory being visited in preorder."
576 #: build/C/man3/fts.3:144
582 #: build/C/man3/fts.3:152
584 "A directory that causes a cycle in the tree. (The I<fts_cycle> field of the "
585 "I<FTSENT> structure will be filled in as well.)"
589 #: build/C/man3/fts.3:152
591 msgid "B<FTS_DEFAULT>"
595 #: build/C/man3/fts.3:160
597 "Any I<FTSENT> structure that represents a file type not explicitly described "
598 "by one of the other I<fts_info> values."
602 #: build/C/man3/fts.3:160
608 #: build/C/man3/fts.3:166
610 "A directory which cannot be read. This is an error return, and the "
611 "I<fts_errno> field will be set to indicate what caused the error."
615 #: build/C/man3/fts.3:166
621 #: build/C/man3/fts.3:176
623 "A file named \".\" or \"..\" which was not specified as a filename to "
624 "B<fts_open>() (see B<FTS_SEEDOT>)."
628 #: build/C/man3/fts.3:176
634 #: build/C/man3/fts.3:186
636 "A directory being visited in postorder. The contents of the I<FTSENT> "
637 "structure will be unchanged from when it was returned in preorder, that is, "
638 "with the I<fts_info> field set to B<FTS_D>."
642 #: build/C/man3/fts.3:186
648 #: build/C/man3/fts.3:191
650 "This is an error return, and the I<fts_errno> field will be set to indicate "
651 "what caused the error."
655 #: build/C/man3/fts.3:191
661 #: build/C/man3/fts.3:194
662 msgid "A regular file."
666 #: build/C/man3/fts.3:194
672 #: build/C/man3/fts.3:205
674 "A file for which no B<stat>(2) information was available. The contents of "
675 "the I<fts_statp> field are undefined. This is an error return, and the "
676 "I<fts_errno> field will be set to indicate what caused the error."
680 #: build/C/man3/fts.3:205
686 #: build/C/man3/fts.3:213
688 "A file for which no B<stat>(2) information was requested. The contents of "
689 "the I<fts_statp> field are undefined."
693 #: build/C/man3/fts.3:213
699 #: build/C/man3/fts.3:216
700 msgid "A symbolic link."
704 #: build/C/man3/fts.3:216
706 msgid "B<FTS_SLNONE>"
711 #: build/C/man3/fts.3:224
713 "A symbolic link with a nonexistent target. The contents of the I<fts_statp> "
714 "field reference the file characteristic information for the symbolic link "
719 #: build/C/man3/fts.3:225
721 msgid "I<fts_accpath>"
725 #: build/C/man3/fts.3:228
726 msgid "A path for accessing the file from the current directory."
730 #: build/C/man3/fts.3:228
736 #: build/C/man3/fts.3:234
738 "The path for the file relative to the root of the traversal. This path "
739 "contains the path specified to B<fts_open>() as a prefix."
743 #: build/C/man3/fts.3:234
745 msgid "I<fts_pathlen>"
749 #: build/C/man3/fts.3:238
750 msgid "The length of the string referenced by I<fts_path>."
754 #: build/C/man3/fts.3:238
760 #: build/C/man3/fts.3:241
761 msgid "The name of the file."
765 #: build/C/man3/fts.3:241
767 msgid "I<fts_namelen>"
771 #: build/C/man3/fts.3:245
772 msgid "The length of the string referenced by I<fts_name>."
776 #: build/C/man3/fts.3:245
782 #: build/C/man3/fts.3:256
784 "The depth of the traversal, numbered from -1 to N, where this file was "
785 "found. The I<FTSENT> structure representing the parent of the starting "
786 "point (or root) of the traversal is numbered -1, and the I<FTSENT> "
787 "structure for the root itself is numbered 0."
791 #: build/C/man3/fts.3:256
797 #: build/C/man3/fts.3:279
799 "Upon return of a I<FTSENT> structure from the B<fts_children>() or "
800 "B<fts_read>() functions, with its I<fts_info> field set to B<FTS_DNR>, "
801 "B<FTS_ERR> or B<FTS_NS>, the I<fts_errno> field contains the value of the "
802 "external variable I<errno> specifying the cause of the error. Otherwise, "
803 "the contents of the I<fts_errno> field are undefined."
807 #: build/C/man3/fts.3:279
809 msgid "I<fts_number>"
813 #: build/C/man3/fts.3:285
815 "This field is provided for the use of the application program and is not "
816 "modified by the fts functions. It is initialized to 0."
820 #: build/C/man3/fts.3:285
822 msgid "I<fts_pointer>"
826 #: build/C/man3/fts.3:292
828 "This field is provided for the use of the application program and is not "
829 "modified by the fts functions. It is initialized to NULL."
833 #: build/C/man3/fts.3:292
835 msgid "I<fts_parent>"
839 #: build/C/man3/fts.3:306
841 "A pointer to the I<FTSENT> structure referencing the file in the hierarchy "
842 "immediately above the current file, that is, the directory of which this "
843 "file is a member. A parent structure for the initial entry point is "
844 "provided as well, however, only the I<fts_level>, I<fts_number> and "
845 "I<fts_pointer> fields are guaranteed to be initialized."
849 #: build/C/man3/fts.3:306
855 #: build/C/man3/fts.3:317
857 "Upon return from the B<fts_children>() function, the I<fts_link> field "
858 "points to the next structure in the NULL-terminated linked list of directory "
859 "members. Otherwise, the contents of the I<fts_link> field are undefined."
863 #: build/C/man3/fts.3:317
869 #: build/C/man3/fts.3:333
871 "If a directory causes a cycle in the hierarchy (see B<FTS_DC>), either "
872 "because of a hard link between two directories, or a symbolic link pointing "
873 "to a directory, the I<fts_cycle> field of the structure will point to the "
874 "I<FTSENT> structure in the hierarchy that references the same file as the "
875 "current I<FTSENT> structure. Otherwise, the contents of the I<fts_cycle> "
876 "field are undefined."
880 #: build/C/man3/fts.3:333
887 #: build/C/man3/fts.3:339
888 msgid "A pointer to B<stat>(2) information for the file."
892 #: build/C/man3/fts.3:366
894 "A single buffer is used for all of the paths of all of the files in the file "
895 "hierarchy. Therefore, the I<fts_path> and I<fts_accpath> fields are "
896 "guaranteed to be null-terminated I<only> for the file most recently returned "
897 "by B<fts_read>(). To use these fields to reference any files represented by "
898 "other I<FTSENT> structures will require that the path buffer be modified "
899 "using the information contained in that I<FTSENT> structure's I<fts_pathlen> "
900 "field. Any such modifications should be undone before further calls to "
901 "B<fts_read>() are attempted. The I<fts_name> field is always "
906 #: build/C/man3/fts.3:366
912 #: build/C/man3/fts.3:374
914 "The B<fts_open>() function takes a pointer to an array of character "
915 "pointers naming one or more paths which make up a logical file hierarchy to "
916 "be traversed. The array must be terminated by a NULL pointer."
919 #. .Bl -tag -width "FTS_PHYSICAL"
921 #: build/C/man3/fts.3:384
923 "There are a number of options, at least one of which (either B<FTS_LOGICAL> "
924 "or B<FTS_PHYSICAL>) must be specified. The options are selected by ORing "
925 "the following values:"
929 #: build/C/man3/fts.3:384
931 msgid "B<FTS_COMFOLLOW>"
935 #: build/C/man3/fts.3:390
937 "This option causes any symbolic link specified as a root path to be followed "
938 "immediately whether or not B<FTS_LOGICAL> is also specified."
942 #: build/C/man3/fts.3:390
944 msgid "B<FTS_LOGICAL>"
948 #: build/C/man3/fts.3:409
950 "This option causes the fts routines to return I<FTSENT> structures for the "
951 "targets of symbolic links instead of the symbolic links themselves. If this "
952 "option is set, the only symbolic links for which I<FTSENT> structures are "
953 "returned to the application are those referencing nonexistent files. Either "
954 "B<FTS_LOGICAL> or B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>() "
959 #: build/C/man3/fts.3:409
961 msgid "B<FTS_NOCHDIR>"
965 #: build/C/man3/fts.3:425
967 "As a performance optimization, the fts functions change directories as they "
968 "walk the file hierarchy. This has the side-effect that an application "
969 "cannot rely on being in any particular directory during the traversal. The "
970 "B<FTS_NOCHDIR> option turns off this optimization, and the fts functions "
971 "will not change the current directory. Note that applications should not "
972 "themselves change their current directory and try to access files unless "
973 "B<FTS_NOCHDIR> is specified and absolute pathnames were provided as "
974 "arguments to B<fts_open>()."
978 #: build/C/man3/fts.3:425
980 msgid "B<FTS_NOSTAT>"
984 #: build/C/man3/fts.3:441
986 "By default, returned I<FTSENT> structures reference file characteristic "
987 "information (the I<statp> field) for each file visited. This option relaxes "
988 "that requirement as a performance optimization, allowing the fts functions "
989 "to set the I<fts_info> field to B<FTS_NSOK> and leave the contents of the "
990 "I<statp> field undefined."
994 #: build/C/man3/fts.3:441
996 msgid "B<FTS_PHYSICAL>"
1000 #: build/C/man3/fts.3:460
1002 "This option causes the fts routines to return I<FTSENT> structures for "
1003 "symbolic links themselves instead of the target files they point to. If "
1004 "this option is set, I<FTSENT> structures for all symbolic links in the "
1005 "hierarchy are returned to the application. Either B<FTS_LOGICAL> or "
1006 "B<FTS_PHYSICAL> I<must> be provided to the B<fts_open>() function."
1010 #: build/C/man3/fts.3:460
1012 msgid "B<FTS_SEEDOT>"
1016 #: build/C/man3/fts.3:473
1018 "By default, unless they are specified as path arguments to B<fts_open>(), "
1019 "any files named \".\" or \"..\" encountered in the file hierarchy are "
1020 "ignored. This option causes the fts routines to return I<FTSENT> structures "
1025 #: build/C/man3/fts.3:473
1032 #: build/C/man3/fts.3:479
1034 "This option prevents fts from descending into directories that have a "
1035 "different device number than the file from which the descent began."
1039 #: build/C/man3/fts.3:518
1041 "The argument B<compar>() specifies a user-defined function which may be "
1042 "used to order the traversal of the hierarchy. It takes two pointers to "
1043 "pointers to I<FTSENT> structures as arguments and should return a negative "
1044 "value, zero, or a positive value to indicate if the file referenced by its "
1045 "first argument comes before, in any order with respect to, or after, the "
1046 "file referenced by its second argument. The I<fts_accpath>, I<fts_path> and "
1047 "I<fts_pathlen> fields of the I<FTSENT> structures may I<never> be used in "
1048 "this comparison. If the I<fts_info> field is set to B<FTS_NS> or "
1049 "B<FTS_NSOK>, the I<fts_statp> field may not either. If the B<compar>() "
1050 "argument is NULL, the directory traversal order is in the order listed in "
1051 "I<path_argv> for the root paths, and in the order listed in the directory "
1052 "for everything else."
1056 #: build/C/man3/fts.3:518
1062 #: build/C/man3/fts.3:531
1064 "The B<fts_read>() function returns a pointer to an I<FTSENT> structure "
1065 "describing a file in the hierarchy. Directories (that are readable and do "
1066 "not cause cycles) are visited at least twice, once in preorder and once in "
1067 "postorder. All other files are visited at least once. (Hard links between "
1068 "directories that do not cause cycles or symbolic links to symbolic links may "
1069 "cause files to be visited more than once, or directories more than twice.)"
1073 #: build/C/man3/fts.3:552
1075 "If all the members of the hierarchy have been returned, B<fts_read>() "
1076 "returns NULL and sets the external variable I<errno> to 0. If an error "
1077 "unrelated to a file in the hierarchy occurs, B<fts_read>() returns NULL and "
1078 "sets I<errno> appropriately. If an error related to a returned file occurs, "
1079 "a pointer to an I<FTSENT> structure is returned, and I<errno> may or may not "
1080 "have been set (see I<fts_info>)."
1084 #: build/C/man3/fts.3:569
1086 "The I<FTSENT> structures returned by B<fts_read>() may be overwritten after "
1087 "a call to B<fts_close>() on the same file hierarchy stream, or, after a "
1088 "call to B<fts_read>() on the same file hierarchy stream unless they "
1089 "represent a file of type directory, in which case they will not be "
1090 "overwritten until after a call to B<fts_read>() after the I<FTSENT> "
1091 "structure has been returned by the function B<fts_read>() in postorder."
1095 #: build/C/man3/fts.3:569
1097 msgid "fts_children()"
1101 #: build/C/man3/fts.3:587
1103 "The B<fts_children>() function returns a pointer to an I<FTSENT> structure "
1104 "describing the first entry in a NULL-terminated linked list of the files in "
1105 "the directory represented by the I<FTSENT> structure most recently returned "
1106 "by B<fts_read>(). The list is linked through the I<fts_link> field of the "
1107 "I<FTSENT> structure, and is ordered by the user-specified comparison "
1108 "function, if any. Repeated calls to B<fts_children>() will recreate this "
1113 #: build/C/man3/fts.3:615
1115 "As a special case, if B<fts_read>() has not yet been called for a "
1116 "hierarchy, B<fts_children>() will return a pointer to the files in the "
1117 "logical directory specified to B<fts_open>(), that is, the arguments "
1118 "specified to B<fts_open>(). Otherwise, if the I<FTSENT> structure most "
1119 "recently returned by B<fts_read>() is not a directory being visited in "
1120 "preorder, or the directory does not contain any files, B<fts_children>() "
1121 "returns NULL and sets I<errno> to zero. If an error occurs, "
1122 "B<fts_children>() returns NULL and sets I<errno> appropriately."
1126 #: build/C/man3/fts.3:626
1128 "The I<FTSENT> structures returned by B<fts_children>() may be overwritten "
1129 "after a call to B<fts_children>(), B<fts_close>() or B<fts_read>() on the "
1130 "same file hierarchy stream."
1133 #. .Bl -tag -width FTS_NAMEONLY
1135 #: build/C/man3/fts.3:630
1136 msgid "I<Option> may be set to the following value:"
1140 #: build/C/man3/fts.3:630
1142 msgid "B<FTS_NAMEONLY>"
1147 #: build/C/man3/fts.3:640
1149 "Only the names of the files are needed. The contents of all the fields in "
1150 "the returned linked list of structures are undefined with the exception of "
1151 "the I<fts_name> and I<fts_namelen> fields."
1155 #: build/C/man3/fts.3:640
1160 #. .Bl -tag -width FTS_PHYSICAL
1162 #: build/C/man3/fts.3:655
1164 "The function B<fts_set>() allows the user application to determine further "
1165 "processing for the file I<f> of the stream I<ftsp>. The B<fts_set>() "
1166 "function returns 0 on success, and -1 if an error occurs. I<Option> must be "
1167 "set to one of the following values:"
1171 #: build/C/man3/fts.3:655
1173 msgid "B<FTS_AGAIN>"
1177 #: build/C/man3/fts.3:673
1179 "Re-visit the file; any file type may be revisited. The next call to "
1180 "B<fts_read>() will return the referenced file. The I<fts_stat> and "
1181 "I<fts_info> fields of the structure will be reinitialized at that time, but "
1182 "no other fields will have been changed. This option is meaningful only for "
1183 "the most recently returned file from B<fts_read>(). Normal use is for "
1184 "postorder directory visits, where it causes the directory to be revisited "
1185 "(in both preorder and postorder) as well as all of its descendants."
1189 #: build/C/man3/fts.3:673
1191 msgid "B<FTS_FOLLOW>"
1195 #: build/C/man3/fts.3:701
1197 "The referenced file must be a symbolic link. If the referenced file is the "
1198 "one most recently returned by B<fts_read>(), the next call to B<fts_read>() "
1199 "returns the file with the I<fts_info> and I<fts_statp> fields reinitialized "
1200 "to reflect the target of the symbolic link instead of the symbolic link "
1201 "itself. If the file is one of those most recently returned by "
1202 "B<fts_children>(), the I<fts_info> and I<fts_statp> fields of the structure, "
1203 "when returned by B<fts_read>(), will reflect the target of the symbolic link "
1204 "instead of the symbolic link itself. In either case, if the target of the "
1205 "symbolic link does not exist the fields of the returned structure will be "
1206 "unchanged and the I<fts_info> field will be set to B<FTS_SLNONE>."
1210 #: build/C/man3/fts.3:705
1212 "If the target of the link is a directory, the preorder return, followed by "
1213 "the return of all of its descendants, followed by a postorder return, is "
1218 #: build/C/man3/fts.3:705
1225 #: build/C/man3/fts.3:713
1227 "No descendants of this file are visited. The file may be one of those most "
1228 "recently returned by either B<fts_children>() or B<fts_read>()."
1232 #: build/C/man3/fts.3:713
1238 #: build/C/man3/fts.3:726
1240 "The B<fts_close>() function closes a file hierarchy stream I<ftsp> and "
1241 "restores the current directory to the directory from which B<fts_open>() "
1242 "was called to open I<ftsp>. The B<fts_close>() function returns 0 on "
1243 "success, and -1 if an error occurs."
1247 #: build/C/man3/fts.3:726 build/C/man2/mount.2:286 build/C/man2/spu_create.2:168 build/C/man2/spu_run.2:149 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/sysfs.2:77 build/C/man2/umount.2:104 build/C/man2/ustat.2:75
1253 #: build/C/man3/fts.3:735
1255 "The function B<fts_open>() may fail and set I<errno> for any of the errors "
1256 "specified for B<open>(2) and B<malloc>(3)."
1260 #: build/C/man3/fts.3:744
1262 "The function B<fts_close>() may fail and set I<errno> for any of the errors "
1263 "specified for B<chdir>(2) and B<close>(2)."
1267 #: build/C/man3/fts.3:758
1269 "The functions B<fts_read>() and B<fts_children>() may fail and set "
1270 "I<errno> for any of the errors specified for B<chdir>(2), B<malloc>(3), "
1271 "B<opendir>(3), B<readdir>(3) and B<stat>(2)."
1275 #: build/C/man3/fts.3:767
1277 "In addition, B<fts_children>(), B<fts_open>() and B<fts_set>() may fail "
1278 "and set I<errno> as follows:"
1282 #: build/C/man3/fts.3:767 build/C/man2/mount.2:322 build/C/man2/spu_create.2:182 build/C/man2/spu_run.2:170 build/C/man2/sysfs.2:82 build/C/man2/umount.2:125 build/C/man2/ustat.2:80
1288 #: build/C/man3/fts.3:770
1289 msgid "The options were invalid."
1293 #: build/C/man3/fts.3:770 build/C/man2/getxattr.2:132 build/C/man2/listxattr.2:144 build/C/man2/mount.2:380 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:142 build/C/man2/spu_create.2:242 build/C/man2/spu_run.2:184 build/C/man2/umount.2:150
1299 #: build/C/man3/fts.3:772
1300 msgid "These functions are available in Linux since glibc2."
1304 #: build/C/man3/fts.3:772 build/C/man3/ftw.3:319 build/C/man3/getfsent.3:109 build/C/man3/getmntent.3:175 build/C/man2/getxattr.2:135 build/C/man2/listxattr.2:147 build/C/man2/mount.2:391 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:145 build/C/man2/spu_create.2:246 build/C/man2/spu_run.2:188 build/C/man2/stat.2:355 build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155 build/C/man2/sysfs.2:90 build/C/man2/umount.2:156 build/C/man2/ustat.2:90
1306 msgid "CONFORMING TO"
1309 #. The following statement is years old, and seems no closer to
1310 #. being true -- mtk
1313 #. utility is expected to be included in a future
1317 #: build/C/man3/fts.3:781
1322 #: build/C/man3/fts.3:787
1323 msgid "B<find>(1), B<chdir>(2), B<stat>(2), B<ftw>(3), B<qsort>(3)"
1327 #: build/C/man3/ftw.3:34
1333 #: build/C/man3/ftw.3:34
1339 #: build/C/man3/ftw.3:37
1340 msgid "ftw, nftw - file tree walk"
1344 #: build/C/man3/ftw.3:40
1346 msgid "B<#include E<lt>ftw.hE<gt>>\n"
1350 #: build/C/man3/ftw.3:45
1353 "B<int ftw(const char *>I<dirpath>B<,>\n"
1354 "B< int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1356 "B< int >I<typeflag>B<),>\n"
1357 "B< int >I<nopenfd>B<);>\n"
1361 #: build/C/man3/ftw.3:48
1364 "B<#define _XOPEN_SOURCE 500> /* See feature_test_macros(7) */\n"
1365 "B<#include E<lt>ftw.hE<gt>>\n"
1369 #: build/C/man3/ftw.3:53
1372 "B<int nftw(const char *>I<dirpath>B<,>\n"
1373 "B< int (*>I<fn>B<) (const char *>I<fpath>B<, const struct stat "
1375 "B< int >I<typeflag>B<, struct FTW *>I<ftwbuf>B<),>\n"
1376 "B< int >I<nopenfd>B<, int >I<flags>B<);>\n"
1380 #: build/C/man3/ftw.3:61
1382 "B<ftw>() walks through the directory tree that is located under the "
1383 "directory I<dirpath>, and calls I<fn>() once for each entry in the tree. By "
1384 "default, directories are handled before the files and subdirectories they "
1385 "contain (preorder traversal)."
1389 #: build/C/man3/ftw.3:74
1391 "To avoid using up all of the calling process's file descriptors, I<nopenfd> "
1392 "specifies the maximum number of directories that B<ftw>() will hold open "
1393 "simultaneously. When the search depth exceeds this, B<ftw>() will become "
1394 "slower because directories have to be closed and reopened. B<ftw>() uses "
1395 "at most one file descriptor for each level in the directory tree."
1399 #: build/C/man3/ftw.3:103
1401 "For each entry found in the tree, B<ftw>() calls I<fn>() with three "
1402 "arguments: I<fpath>, I<sb>, and I<typeflag>. I<fpath> is the pathname of "
1403 "the entry, and is expressed either as a pathname relative to the calling "
1404 "process's current working directory at the time of the call to B<ftw>(), if "
1405 "I<dirpath> was expressed as a relative pathname, or as an absolute pathname, "
1406 "if I<dirpath> was expressed as an absolute pathname. I<sb> is a pointer to "
1407 "the I<stat> structure returned by a call to B<stat>(2) for I<fpath>. "
1408 "I<typeflag> is an integer that has one of the following values:"
1412 #: build/C/man3/ftw.3:103
1418 #: build/C/man3/ftw.3:107
1419 msgid "I<fpath> is a regular file."
1423 #: build/C/man3/ftw.3:107
1429 #: build/C/man3/ftw.3:111
1430 msgid "I<fpath> is a directory."
1434 #: build/C/man3/ftw.3:111
1440 #: build/C/man3/ftw.3:115
1441 msgid "I<fpath> is a directory which can't be read."
1445 #: build/C/man3/ftw.3:115
1451 #: build/C/man3/ftw.3:122
1452 msgid "The B<stat>(2) call failed on I<fpath>, which is not a symbolic link."
1456 #: build/C/man3/ftw.3:131
1458 "If I<fpath> is a symbolic link and B<stat>(2) failed, POSIX.1-2001 states "
1459 "that it is undefined whether B<FTW_NS> or B<FTW_SL> (see below) is passed "
1464 #: build/C/man3/ftw.3:142
1466 "To stop the tree walk, I<fn>() returns a nonzero value; this value will "
1467 "become the return value of B<ftw>(). As long as I<fn>() returns 0, B<ftw>() "
1468 "will continue either until it has traversed the entire tree, in which case "
1469 "it will return zero, or until it encounters an error (such as a B<malloc>(3) "
1470 "failure), in which case it will return -1."
1474 #: build/C/man3/ftw.3:152
1476 "Because B<ftw>() uses dynamic data structures, the only safe way to exit "
1477 "out of a tree walk is to return a nonzero value from I<fn>(). To allow a "
1478 "signal to terminate the walk without causing a memory leak, have the handler "
1479 "set a global flag that is checked by I<fn>(). I<Don't> use B<longjmp>(3) "
1480 "unless the program is going to terminate."
1484 #: build/C/man3/ftw.3:152
1490 #: build/C/man3/ftw.3:159
1492 "The function B<nftw>() is the same as B<ftw>(), except that it has one "
1493 "additional argument, I<flags>, and calls I<fn>() with one more argument, "
1498 #: build/C/man3/ftw.3:162
1500 "This I<flags> argument is formed by ORing zero or more of the following "
1505 #: build/C/man3/ftw.3:162
1507 msgid "B<FTW_ACTIONRETVAL> (since glibc 2.3.3)"
1511 #: build/C/man3/ftw.3:171
1513 "If this glibc-specific flag is set, then B<nftw>() handles the return value "
1514 "from I<fn>() differently. I<fn>() should return one of the following "
1519 #: build/C/man3/ftw.3:172
1521 msgid "B<FTW_CONTINUE>"
1525 #: build/C/man3/ftw.3:177
1526 msgid "Instructs B<nftw>() to continue normally."
1530 #: build/C/man3/ftw.3:177
1532 msgid "B<FTW_SKIP_SIBLINGS>"
1535 #. If \fBFTW_DEPTH\fP
1536 #. is set, the entry's parent directory is processed next (with
1537 #. \fIflag\fP set to \fBFTW_DP\fP).
1539 #: build/C/man3/ftw.3:185
1541 "If I<fn>() returns this value, then siblings of the current entry will be "
1542 "skipped, and processing continues in the parent."
1546 #: build/C/man3/ftw.3:185
1548 msgid "B<FTW_SKIP_SUBTREE>"
1552 #: build/C/man3/ftw.3:193
1554 "If I<fn>() is called with an entry that is a directory (I<typeflag> is "
1555 "B<FTW_D>), this return value will prevent objects within that directory from "
1556 "being passed as arguments to I<fn>(). B<nftw>() continues processing with "
1557 "the next sibling of the directory."
1561 #: build/C/man3/ftw.3:193
1567 #: build/C/man3/ftw.3:199
1568 msgid "Causes B<nftw>() to return immediately with the return value B<FTW_STOP>."
1572 #: build/C/man3/ftw.3:202
1574 "Other return values could be associated with new actions in the future; "
1575 "I<fn>() should not return values other than those listed above."
1579 #: build/C/man3/ftw.3:211
1581 "The feature test macro B<_GNU_SOURCE> must be defined (before including "
1582 "I<any> header files) in order to obtain the definition of "
1583 "B<FTW_ACTIONRETVAL> from I<E<lt>ftw.hE<gt>>."
1587 #: build/C/man3/ftw.3:212
1589 msgid "B<FTW_CHDIR>"
1593 #: build/C/man3/ftw.3:219
1595 "If set, do a B<chdir>(2) to each directory before handling its contents. "
1596 "This is useful if the program needs to perform some action in the directory "
1597 "in which I<fpath> resides."
1601 #: build/C/man3/ftw.3:219
1603 msgid "B<FTW_DEPTH>"
1607 #: build/C/man3/ftw.3:225
1609 "If set, do a post-order traversal, that is, call I<fn>() for the directory "
1610 "itself I<after> handling the contents of the directory and its "
1611 "subdirectories. (By default, each directory is handled I<before> its "
1616 #: build/C/man3/ftw.3:225
1618 msgid "B<FTW_MOUNT>"
1622 #: build/C/man3/ftw.3:229
1623 msgid "If set, stay within the same file system (i.e., do not cross mount points)."
1627 #: build/C/man3/ftw.3:229
1633 #: build/C/man3/ftw.3:234
1635 "If set, do not follow symbolic links. (This is what you want.) If not set, "
1636 "symbolic links are followed, but no file is reported twice."
1640 #: build/C/man3/ftw.3:239
1642 "If B<FTW_PHYS> is not set, but B<FTW_DEPTH> is set, then the function "
1643 "I<fn>() is never called for a directory that would be a descendant of "
1648 #: build/C/man3/ftw.3:254
1650 "For each entry in the directory tree, B<nftw>() calls I<fn>() with four "
1651 "arguments. I<fpath> and I<sb> are as for B<ftw>(). I<typeflag> may receive "
1652 "any of the same values as with B<ftw>(), or any of the following values:"
1656 #: build/C/man3/ftw.3:254
1662 #: build/C/man3/ftw.3:260
1664 "I<fpath> is a directory, and B<FTW_DEPTH> was specified in I<flags>. All of "
1665 "the files and subdirectories within I<fpath> have been processed."
1669 #: build/C/man3/ftw.3:260
1674 #. To obtain the definition of this constant from
1678 #. must be defined, or
1679 #. .BR _XOPEN_SOURCE
1680 #. must be defined with a value of 500 or more.
1682 #: build/C/man3/ftw.3:271
1683 msgid "I<fpath> is a symbolic link, and B<FTW_PHYS> was set in I<flags>."
1687 #: build/C/man3/ftw.3:271
1693 #: build/C/man3/ftw.3:276
1695 "I<fpath> is a symbolic link pointing to a nonexistent file. (This occurs "
1696 "only if B<FTW_PHYS> is not set.)"
1700 #: build/C/man3/ftw.3:282
1702 "The fourth argument that B<nftw>() supplies when calling I<fn>() is a "
1703 "structure of type I<FTW>:"
1707 #: build/C/man3/ftw.3:289
1717 #: build/C/man3/ftw.3:302
1719 "I<base> is the offset of the filename (i.e., basename component) in the "
1720 "pathname given in I<fpath>. I<level> is the depth of I<fpath> in the "
1721 "directory tree, relative to the root of the tree (I<dirpath>, which has "
1726 #: build/C/man3/ftw.3:302 build/C/man3/getfsent.3:95 build/C/man3/getmntent.3:148 build/C/man2/getxattr.2:102 build/C/man2/listxattr.2:120 build/C/man2/mount.2:281 build/C/man2/removexattr.2:80 build/C/man2/setxattr.2:107 build/C/man2/spu_create.2:161 build/C/man2/spu_run.2:98 build/C/man2/stat.2:300 build/C/man2/statfs.2:127 build/C/man3/statvfs.3:94 build/C/man2/sysfs.2:65 build/C/man2/umount.2:99 build/C/man2/ustat.2:66
1728 msgid "RETURN VALUE"
1732 #: build/C/man3/ftw.3:304
1733 msgid "These functions return 0 on success, and -1 if an error occurs."
1737 #: build/C/man3/ftw.3:311
1739 "If I<fn>() returns nonzero, then the tree walk is terminated and the value "
1740 "returned by I<fn>() is returned as the result of B<ftw>() or B<nftw>()."
1744 #: build/C/man3/ftw.3:319
1746 "If B<nftw>() is called with the B<FTW_ACTIONRETVAL> flag, then the only "
1747 "nonzero value that should be used by I<fn>() to terminate the tree walk is "
1748 "B<FTW_STOP>, and that value is returned as the result of B<nftw>()."
1752 #: build/C/man3/ftw.3:324
1753 msgid "POSIX.1-2001, SVr4, SUSv1. POSIX.1-2008 marks B<ftw>() as obsolete."
1757 #: build/C/man3/ftw.3:324 build/C/man3/getfsent.3:119 build/C/man3/getmntent.3:181 build/C/man2/mount.2:394 build/C/man2/spu_create.2:250 build/C/man2/spu_run.2:192 build/C/man2/stat.2:493 build/C/man2/statfs.2:194 build/C/man3/statvfs.3:157 build/C/man2/sysfs.2:92 build/C/man2/umount.2:159 build/C/man2/ustat.2:94
1763 #: build/C/man3/ftw.3:328
1765 "POSIX.1-2001 note that the results are unspecified if I<fn> does not "
1766 "preserve the current working directory."
1770 #: build/C/man3/ftw.3:334
1772 "The function B<nftw>() and the use of B<FTW_SL> with B<ftw>() were "
1773 "introduced in SUSv1."
1777 #: build/C/man3/ftw.3:344
1779 "On some systems B<ftw>() will never use B<FTW_SL>, on other systems "
1780 "B<FTW_SL> occurs only for symbolic links that do not point to an existing "
1781 "file, and again on other systems B<ftw>() will use B<FTW_SL> for each "
1782 "symbolic link. For predictable control, use B<nftw>()."
1786 #: build/C/man3/ftw.3:348
1788 "Under Linux, libc4 and libc5 and glibc 2.0.6 will use B<FTW_F> for all "
1789 "objects (files, symbolic links, FIFOs, etc.) that can be stat'ed but are "
1794 #: build/C/man3/ftw.3:352
1795 msgid "The function B<nftw>() is available since glibc 2.1."
1799 #: build/C/man3/ftw.3:354
1800 msgid "B<FTW_ACTIONRETVAL> is glibc-specific."
1804 #: build/C/man3/ftw.3:354 build/C/man2/spu_create.2:260 build/C/man2/spu_run.2:202 build/C/man7/spufs.7:758 build/C/man2/stat.2:584
1810 #: build/C/man3/ftw.3:363
1812 "The following program traverses the directory tree under the path named in "
1813 "its first command-line argument, or under the current directory if no "
1814 "argument is supplied. It displays various information about each file. The "
1815 "second command-line argument can be used to specify characters that control "
1816 "the value assigned to the I<flags> argument when calling B<nftw>()."
1820 #: build/C/man3/ftw.3:371
1823 "#define _XOPEN_SOURCE 500\n"
1824 "#include E<lt>ftw.hE<gt>\n"
1825 "#include E<lt>stdio.hE<gt>\n"
1826 "#include E<lt>stdlib.hE<gt>\n"
1827 "#include E<lt>string.hE<gt>\n"
1828 "#include E<lt>stdint.hE<gt>\n"
1832 #: build/C/man3/ftw.3:385
1836 "display_info(const char *fpath, const struct stat *sb,\n"
1837 " int tflag, struct FTW *ftwbuf)\n"
1839 " printf(\"%-3s %2d %7jd %-40s %d %s\\en\",\n"
1840 " (tflag == FTW_D) ? \"d\" : (tflag == FTW_DNR) ? \"dnr\" :\n"
1841 " (tflag == FTW_DP) ? \"dp\" : (tflag == FTW_F) ? \"f\" :\n"
1842 " (tflag == FTW_NS) ? \"ns\" : (tflag == FTW_SL) ? \"sl\" :\n"
1843 " (tflag == FTW_SLN) ? \"sln\" : \"???\",\n"
1844 " ftwbuf-E<gt>level, (intmax_t) sb-E<gt>st_size,\n"
1845 " fpath, ftwbuf-E<gt>base, fpath + ftwbuf-E<gt>base);\n"
1846 " return 0; /* To tell nftw() to continue */\n"
1851 #: build/C/man3/ftw.3:390
1855 "main(int argc, char *argv[])\n"
1861 #: build/C/man3/ftw.3:395
1864 " if (argc E<gt> 2 && strchr(argv[2], \\(aqd\\(aq) != NULL)\n"
1865 " flags |= FTW_DEPTH;\n"
1866 " if (argc E<gt> 2 && strchr(argv[2], \\(aqp\\(aq) != NULL)\n"
1867 " flags |= FTW_PHYS;\n"
1871 #: build/C/man3/ftw.3:403
1874 " if (nftw((argc E<lt> 2) ? \".\" : argv[1], display_info, 20, flags)\n"
1876 " perror(\"nftw\");\n"
1877 " exit(EXIT_FAILURE);\n"
1879 " exit(EXIT_SUCCESS);\n"
1884 #: build/C/man3/ftw.3:408
1885 msgid "B<stat>(2), B<fts>(3), B<readdir>(3)"
1889 #: build/C/man3/getfsent.3:25
1895 #: build/C/man3/getfsent.3:25
1901 #: build/C/man3/getfsent.3:25
1907 #: build/C/man3/getfsent.3:28
1908 msgid "getfsent, getfsspec, getfsfile, setfsent, endfsent - handle fstab entries"
1912 #: build/C/man3/getfsent.3:30
1913 msgid "B<#include E<lt>fstab.hE<gt>>"
1917 #: build/C/man3/getfsent.3:32
1918 msgid "B<void endfsent(void);>"
1922 #: build/C/man3/getfsent.3:34
1923 msgid "B<struct fstab *getfsent(void);>"
1927 #: build/C/man3/getfsent.3:36
1928 msgid "B<struct fstab *getfsfile(const char *>I<mount_point>B<);>"
1932 #: build/C/man3/getfsent.3:38
1933 msgid "B<struct fstab *getfsspec(const char *>I<special_file>B<);>"
1937 #: build/C/man3/getfsent.3:40
1938 msgid "B<int setfsent(void);>"
1942 #: build/C/man3/getfsent.3:44
1944 "These functions read from the file I</etc/fstab>. The I<struct fstab> is "
1949 #: build/C/man3/getfsent.3:56
1953 " char *fs_spec; /* block device name */\n"
1954 " char *fs_file; /* mount point */\n"
1955 " char *fs_vfstype; /* file-sysem type */\n"
1956 " char *fs_mntops; /* mount options */\n"
1957 " const char *fs_type; /* rw/rq/ro/sw/xx option */\n"
1958 " int fs_freq; /* dump frequency, in days */\n"
1959 " int fs_passno; /* pass number on parallel dump */\n"
1964 #: build/C/man3/getfsent.3:64
1966 "Here the field I<fs_type> contains (on a *BSD system) one of the five "
1967 "strings \"rw\", \"rq\", \"ro\", \"sw\", \"xx\" (read-write, read-write with "
1968 "quota, read-only, swap, ignore)."
1972 #: build/C/man3/getfsent.3:68
1974 "The function B<setfsent>() opens the file when required and positions it at "
1979 #: build/C/man3/getfsent.3:73
1981 "The function B<getfsent>() parses the next line from the file. (After "
1982 "opening it when required.)"
1986 #: build/C/man3/getfsent.3:77
1987 msgid "The function B<endfsent>() closes the file when required."
1991 #: build/C/man3/getfsent.3:86
1993 "The function B<getfsspec>() searches the file from the start and returns "
1994 "the first entry found for which the I<fs_spec> field matches the "
1995 "I<special_file> argument."
1999 #: build/C/man3/getfsent.3:95
2001 "The function B<getfsfile>() searches the file from the start and returns "
2002 "the first entry found for which the I<fs_file> field matches the "
2003 "I<mount_point> argument."
2009 #. function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
2011 #: build/C/man3/getfsent.3:109
2013 "Upon success, the functions B<getfsent>(), B<getfsfile>(), and "
2014 "B<getfsspec>() return a pointer to a I<struct fstab>, while B<setfsent>() "
2015 "returns 1. Upon failure or end-of-file, these functions return NULL and 0, "
2020 #: build/C/man3/getfsent.3:119
2022 "These functions are not in POSIX.1-2001. Several operating systems have "
2023 "them, e.g., *BSD, SunOS, Digital UNIX, AIX (which also has a "
2024 "B<getfstype>()). HP-UX has functions of the same names, that however use a "
2025 "I<struct checklist> instead of a I<struct fstab>, and calls these functions "
2026 "obsolete, superseded by B<getmntent>(3)."
2030 #: build/C/man3/getfsent.3:121
2031 msgid "These functions are not thread-safe."
2035 #: build/C/man3/getfsent.3:131
2037 "Since Linux allows mounting a block special device in several places, and "
2038 "since several devices can have the same mount point, where the last device "
2039 "with a given mount point is the interesting one, while B<getfsfile>() and "
2040 "B<getfsspec>() only return the first occurrence, these two functions are "
2041 "not suitable for use under Linux."
2045 #: build/C/man3/getfsent.3:134
2046 msgid "B<getmntent>(3), B<fstab>(5)"
2050 #: build/C/man3/getmntent.3:30
2056 #: build/C/man3/getmntent.3:30
2062 #: build/C/man3/getmntent.3:34
2064 "getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r - get "
2065 "file system descriptor file entry"
2069 #: build/C/man3/getmntent.3:38
2072 "B<#include E<lt>stdio.hE<gt>>\n"
2073 "B<#include E<lt>mntent.hE<gt>>\n"
2077 #: build/C/man3/getmntent.3:40
2079 msgid "B<FILE *setmntent(const char *>I<filename>B<, const char *>I<type>B<);>\n"
2083 #: build/C/man3/getmntent.3:42
2085 msgid "B<struct mntent *getmntent(FILE *>I<fp>B<);>\n"
2089 #: build/C/man3/getmntent.3:44
2091 msgid "B<int addmntent(FILE *>I<fp>B<, const struct mntent *>I<mnt>B<);>\n"
2095 #: build/C/man3/getmntent.3:46
2097 msgid "B<int endmntent(FILE *>I<fp>B<);>\n"
2101 #: build/C/man3/getmntent.3:48
2103 msgid "B<char *hasmntopt(const struct mntent *>I<mnt>B<, const char *>I<opt>B<);>\n"
2107 #: build/C/man3/getmntent.3:51
2110 "/* GNU extension */\n"
2111 "B<#include E<lt>mntent.hE<gt>>\n"
2115 #: build/C/man3/getmntent.3:54
2118 "B<struct mntent *getmntent_r(FILE *>I<fp>B<, struct mntent *>I<mntbuf>B<,>\n"
2119 "B< char *>I<buf>B<, int >I<buflen>B<);>\n"
2123 #: build/C/man3/getmntent.3:59 build/C/man2/stat.2:59
2124 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2128 #: build/C/man3/getmntent.3:63
2129 msgid "B<getmntent_r>(): _BSD_SOURCE || _SVID_SOURCE"
2133 #: build/C/man3/getmntent.3:67
2135 "These routines are used to access the file system description file "
2136 "I</etc/fstab> and the mounted file system description file I</etc/mtab>."
2140 #: build/C/man3/getmntent.3:76
2142 "The B<setmntent>() function opens the file system description file "
2143 "I<filename> and returns a file pointer which can be used by B<getmntent>(). "
2144 "The argument I<type> is the type of access required and can take the same "
2145 "values as the I<mode> argument of B<fopen>(3)."
2149 #: build/C/man3/getmntent.3:86
2151 "The B<getmntent>() function reads the next line from the file system "
2152 "description file I<fp> and returns a pointer to a structure containing the "
2153 "broken out fields from a line in the file. The pointer points to a static "
2154 "area of memory which is overwritten by subsequent calls to B<getmntent>()."
2158 #: build/C/man3/getmntent.3:93
2160 "The B<addmntent>() function adds the I<mntent> structure I<mnt> to the end "
2161 "of the open file I<fp>."
2165 #: build/C/man3/getmntent.3:98
2166 msgid "The B<endmntent>() function closes the file system description file I<fp>."
2170 #: build/C/man3/getmntent.3:108
2172 "The B<hasmntopt>() function scans the I<mnt_opts> field (see below) of the "
2173 "I<mntent> structure I<mnt> for a substring that matches I<opt>. See "
2174 "I<E<lt>mntent.hE<gt>> and B<mount>(8) for valid mount options."
2178 #: build/C/man3/getmntent.3:120
2180 "The reentrant B<getmntent_r>() function is similar to B<getmntent>(), but "
2181 "stores the I<struct mount> in the provided I<*mntbuf> and stores the strings "
2182 "pointed to by the entries in that struct in the provided array I<buf> of "
2187 #: build/C/man3/getmntent.3:122
2188 msgid "The I<mntent> structure is defined in I<E<lt>mntent.hE<gt>> as follows:"
2192 #: build/C/man3/getmntent.3:133
2196 " char *mnt_fsname; /* name of mounted file system */\n"
2197 " char *mnt_dir; /* file system path prefix */\n"
2198 " char *mnt_type; /* mount type (see mntent.h) */\n"
2199 " char *mnt_opts; /* mount options (see mntent.h) */\n"
2200 " int mnt_freq; /* dump frequency in days */\n"
2201 " int mnt_passno; /* pass number on parallel fsck */\n"
2206 #: build/C/man3/getmntent.3:148
2208 "Since fields in the mtab and fstab files are separated by whitespace, octal "
2209 "escapes are used to represent the four characters space (\\e040), tab "
2210 "(\\e011), newline (\\e012) and backslash (\\e134) in those files when they "
2211 "occur in one of the four strings in a I<mntent> structure. The routines "
2212 "B<addmntent>() and B<getmntent>() will convert from string representation "
2213 "to escaped representation and back."
2217 #: build/C/man3/getmntent.3:157
2219 "The B<getmntent>() and B<getmntent_r>() functions return a pointer to the "
2220 "I<mntent> structure or NULL on failure."
2224 #: build/C/man3/getmntent.3:161
2225 msgid "The B<addmntent>() function returns 0 on success and 1 on failure."
2229 #: build/C/man3/getmntent.3:165
2230 msgid "The B<endmntent>() function always returns 1."
2234 #: build/C/man3/getmntent.3:170
2236 "The B<hasmntopt>() function returns the address of the substring if a match "
2237 "is found and NULL otherwise."
2241 #: build/C/man3/getmntent.3:170 build/C/man2/spu_create.2:236
2247 #: build/C/man3/getmntent.3:174
2250 "/etc/fstab file system description file\n"
2251 "/etc/mtab mounted file system description file\n"
2255 #: build/C/man3/getmntent.3:181
2257 "The nonreentrant functions are from SunOS 4.1.3. A routine B<getmntent_r>() "
2258 "was introduced in HP-UX 10, but it returns an int. The prototype shown "
2259 "above is glibc-only."
2263 #: build/C/man3/getmntent.3:193
2265 "System V also has a B<getmntent>() function but the calling sequence "
2266 "differs, and the returned structure is different. Under System V "
2267 "I</etc/mnttab> is used. 4.4BSD and Digital UNIX have a routine "
2268 "B<getmntinfo>(), a wrapper around the system call B<getfsstat>()."
2272 #: build/C/man3/getmntent.3:197
2273 msgid "B<fopen>(3), B<fstab>(5), B<mount>(8)"
2277 #: build/C/man2/getxattr.2:27
2283 #: build/C/man2/getxattr.2:27 build/C/man2/listxattr.2:27 build/C/man2/removexattr.2:27
2289 #: build/C/man2/getxattr.2:30
2290 msgid "getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value"
2294 #: build/C/man2/getxattr.2:35 build/C/man2/listxattr.2:35 build/C/man2/removexattr.2:35 build/C/man2/setxattr.2:35
2297 "B<#include E<lt>sys/types.hE<gt>>\n"
2298 "B<#include E<lt>attr/xattr.hE<gt>>\n"
2302 #: build/C/man2/getxattr.2:42
2305 "B<ssize_t getxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2306 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2307 "B<ssize_t lgetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
2308 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2309 "B<ssize_t fgetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
2310 "B< void\\ *>I<value>B<, size_t >I<size>B<);>\n"
2314 #: build/C/man2/getxattr.2:55 build/C/man2/setxattr.2:55
2316 "Extended attributes are I<name>:I<value> pairs associated with inodes "
2317 "(files, directories, symbolic links, etc.). They are extensions to the "
2318 "normal attributes which are associated with all inodes in the system (i.e., "
2319 "the B<stat>(2) data). A complete overview of extended attributes concepts "
2320 "can be found in B<attr>(5)."
2324 #: build/C/man2/getxattr.2:67
2326 "B<getxattr>() retrieves the I<value> of the extended attribute identified "
2327 "by I<name> and associated with the given I<path> in the file system. The "
2328 "length of the attribute I<value> is returned."
2332 #: build/C/man2/getxattr.2:73
2334 "B<lgetxattr>() is identical to B<getxattr>(), except in the case of a "
2335 "symbolic link, where the link itself is interrogated, not the file that it "
2340 #: build/C/man2/getxattr.2:83
2342 "B<fgetxattr>() is identical to B<getxattr>(), only the open file referred "
2343 "to by I<fd> (as returned by B<open>(2)) is interrogated in place of "
2348 #: build/C/man2/getxattr.2:91
2350 "An extended attribute I<name> is a simple null-terminated string. The name "
2351 "includes a namespace prefix; there may be several, disjoint namespaces "
2352 "associated with an individual inode. The value of an extended attribute is "
2353 "a chunk of arbitrary textual or binary data of specified length."
2357 #: build/C/man2/getxattr.2:98
2359 "An empty buffer of I<size> zero can be passed into these calls to return the "
2360 "current size of the named extended attribute, which can be used to estimate "
2361 "the size of a buffer which is sufficiently large to hold the value "
2362 "associated with the extended attribute."
2366 #: build/C/man2/getxattr.2:102
2368 "The interface is designed to allow guessing of initial buffer sizes, and to "
2369 "enlarge buffers when the return value indicates that the buffer provided was "
2374 #: build/C/man2/getxattr.2:108
2376 "On success, a positive number is returned indicating the size of the "
2377 "extended attribute value. On failure, -1 is returned and I<errno> is set "
2382 #: build/C/man2/getxattr.2:114
2384 "If the named attribute does not exist, or the process has no access to this "
2385 "attribute, I<errno> is set to B<ENOATTR>."
2389 #: build/C/man2/getxattr.2:123
2391 "If the I<size> of the I<value> buffer is too small to hold the result, "
2392 "I<errno> is set to B<ERANGE>."
2396 #: build/C/man2/getxattr.2:128 build/C/man2/listxattr.2:140 build/C/man2/removexattr.2:95 build/C/man2/setxattr.2:138
2398 "If extended attributes are not supported by the file system, or are "
2399 "disabled, I<errno> is set to B<ENOTSUP>."
2403 #: build/C/man2/getxattr.2:132 build/C/man2/listxattr.2:144 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:142
2405 "The errors documented for the B<stat>(2) system call are also applicable "
2410 #: build/C/man2/getxattr.2:135 build/C/man2/listxattr.2:147 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:145
2412 "These system calls have been available on Linux since kernel 2.4; glibc "
2413 "support is provided since version 2.3."
2417 #. Andreas Gruenbacher,
2418 #. .RI < a.gruenbacher@computer.org >
2419 #. and the SGI XFS development team,
2420 #. .RI < linux-xfs@oss.sgi.com >.
2421 #. Please send any bug reports or comments to these addresses.
2423 #: build/C/man2/getxattr.2:143 build/C/man2/listxattr.2:155 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:153
2424 msgid "These system calls are Linux-specific."
2428 #: build/C/man2/getxattr.2:153
2430 "B<getfattr>(1), B<setfattr>(1), B<listxattr>(2), B<open>(2), "
2431 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2435 #: build/C/man2/listxattr.2:27
2441 #: build/C/man2/listxattr.2:30
2442 msgid "listxattr, llistxattr, flistxattr - list extended attribute names"
2446 #: build/C/man2/listxattr.2:41
2449 "B<ssize_t listxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2451 "B<ssize_t llistxattr(const char\\ *>I<path>B<, char\\ *>I<list>B<, size_t "
2453 "B<ssize_t flistxattr(int >I<fd>B<, char\\ *>I<list>B<, size_t "
2458 #: build/C/man2/listxattr.2:52
2460 "Extended attributes are name:value pairs associated with inodes (files, "
2461 "directories, symbolic links, etc.). They are extensions to the normal "
2462 "attributes which are associated with all inodes in the system (i.e., the "
2463 "B<stat>(2) data). A complete overview of extended attributes concepts can "
2464 "be found in B<attr>(5)."
2468 #: build/C/man2/listxattr.2:65
2470 "B<listxattr>() retrieves the I<list> of extended attribute names associated "
2471 "with the given I<path> in the file system. The list is the set of "
2472 "(null-terminated) names, one after the other. Names of extended attributes "
2473 "to which the calling process does not have access may be omitted from the "
2474 "list. The length of the attribute name I<list> is returned."
2478 #: build/C/man2/listxattr.2:72
2480 "B<llistxattr>() is identical to B<listxattr>(), except in the case of a "
2481 "symbolic link, where the list of names of extended attributes associated "
2482 "with the link itself is retrieved, not the file that it refers to."
2486 #: build/C/man2/listxattr.2:82
2488 "B<flistxattr>() is identical to B<listxattr>(), only the open file referred "
2489 "to by I<fd> (as returned by B<open>(2)) is interrogated in place of "
2494 #: build/C/man2/listxattr.2:88
2496 "A single extended attribute I<name> is a simple null-terminated string. The "
2497 "name includes a namespace prefix; there may be several, disjoint namespaces "
2498 "associated with an individual inode."
2502 #: build/C/man2/listxattr.2:94
2504 "An empty buffer of I<size> zero can be passed into these calls to return the "
2505 "current size of the list of extended attribute names, which can be used to "
2506 "estimate the size of a buffer which is sufficiently large to hold the list "
2511 #: build/C/man2/listxattr.2:94
2517 #: build/C/man2/listxattr.2:99
2519 "The I<list> of names is returned as an unordered array of null-terminated "
2520 "character strings (attribute names are separated by null bytes "
2521 "(\\(aq\\e0\\(aq)), like this:"
2525 #: build/C/man2/listxattr.2:104
2527 msgid "user.name1\\e0system.name1\\e0user.name2\\e0\n"
2531 #: build/C/man2/listxattr.2:112
2533 "Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using "
2534 "extended attributes, might return a I<list> like this:"
2538 #: build/C/man2/listxattr.2:117
2540 msgid "system.posix_acl_access\\e0system.posix_acl_default\\e0\n"
2544 #: build/C/man2/listxattr.2:126
2546 "On success, a positive number is returned indicating the size of the "
2547 "extended attribute name list. On failure, -1 is returned and I<errno> is "
2548 "set appropriately."
2552 #: build/C/man2/listxattr.2:135
2554 "If the I<size> of the I<list> buffer is too small to hold the result, "
2555 "I<errno> is set to B<ERANGE>."
2559 #: build/C/man2/listxattr.2:165
2561 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<open>(2), "
2562 "B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
2566 #: build/C/man2/mount.2:40
2572 #: build/C/man2/mount.2:40
2578 #: build/C/man2/mount.2:43
2579 msgid "mount - mount file system"
2583 #: build/C/man2/mount.2:46 build/C/man2/umount.2:36
2585 msgid "B<#include E<lt>sys/mount.hE<gt>>\n"
2589 #: build/C/man2/mount.2:50
2592 "B<int mount(const char *>I<source>B<, const char *>I<target>B<,>\n"
2593 "B< const char *>I<filesystemtype>B<, unsigned long "
2594 ">I<mountflags>B<,>\n"
2595 "B< const void *>I<data>B<);>\n"
2599 #: build/C/man2/mount.2:58
2601 "B<mount>() attaches the file system specified by I<source> (which is often "
2602 "a device name, but can also be a directory name or a dummy) to the directory "
2603 "specified by I<target>."
2607 #: build/C/man2/mount.2:62
2609 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
2610 "to mount file systems."
2613 #. Multiple mounts on same mount point: since 2.3.99pre7.
2615 #: build/C/man2/mount.2:67
2617 "Since Linux 2.4 a single file system can be visible at multiple mount "
2618 "points, and multiple mounts can be stacked on the same mount point."
2622 #: build/C/man2/mount.2:76
2624 "Values for the I<filesystemtype> argument supported by the kernel are listed "
2625 "in I</proc/filesystems> (e.g., \"minix\", \"ext2\", \"ext3\", \"jfs\", "
2626 "\"xfs\", \"reiserfs\", \"msdos\", \"proc\", \"nfs\", \"iso9660\"). Further "
2627 "types may become available when the appropriate modules are loaded."
2630 #. (as defined in \fI<linux/fs.h>\fP for libc4 and libc5
2631 #. and in \fI<sys/mount.h>\fP for glibc2)
2632 #. FIXME 2.6.15 added flags for "shared subtree" functionality:
2633 #. MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
2634 #. These need to be documented on this page.
2636 #. Documentation/filesystems/sharedsubtree.txt
2638 #. http://lwn.net/Articles/159077/
2640 #. http://myweb.sudhaa.com:2022/~ram/sharedsubtree/paper/sharedsubtree.1.pdf
2641 #. Shared-Subtree Concept, Implementation, and Applications in Linux
2642 #. Al Viro viro@ftp.linux.org.uk
2643 #. Ram Pai linuxram@us.ibm.com
2645 #. http://foss.in/2005/slides/sharedsubtree1.pdf
2646 #. Shared Subtree Concept and Implementation in the Linux Kernel
2649 #. 2.6.25 Added MS_I_VERSION, which needs to be documented.
2651 #: build/C/man2/mount.2:105
2653 "The I<mountflags> argument may have the magic number 0xC0ED (B<MS_MGC_VAL>) "
2654 "in the top 16 bits (this was required in kernel versions prior to 2.4, but "
2655 "is no longer required and ignored if specified), and various mount flags in "
2656 "the low order 16 bits:"
2660 #: build/C/man2/mount.2:105
2662 msgid "B<MS_BIND> (Linux 2.4 onward)"
2665 #. since 2.4.0-test9
2666 #. with the exception of the "hidden" MS_REC mountflags bit
2668 #: build/C/man2/mount.2:124
2670 "Perform a bind mount, making a file or a directory subtree visible at "
2671 "another point within a file system. Bind mounts may cross file system "
2672 "boundaries and span B<chroot>(2) jails. The I<filesystemtype> and I<data> "
2673 "arguments are ignored. Up until Linux 2.6.26, I<mountflags> was also "
2674 "ignored (the bind mount has the same mount options as the underlying mount "
2679 #: build/C/man2/mount.2:124
2681 msgid "B<MS_DIRSYNC> (since Linux 2.5.19)"
2685 #: build/C/man2/mount.2:130
2687 "Make directory changes on this file system synchronous. (This property can "
2688 "be obtained for individual directories or subtrees using B<chattr>(1).)"
2692 #: build/C/man2/mount.2:130
2694 msgid "B<MS_MANDLOCK>"
2697 #. FIXME Say more about MS_MOVE
2699 #: build/C/man2/mount.2:137
2701 "Permit mandatory locking on files in this file system. (Mandatory locking "
2702 "must still be enabled on a per-file basis, as described in B<fcntl>(2).)"
2706 #: build/C/man2/mount.2:137
2712 #: build/C/man2/mount.2:148
2714 "Move a subtree. I<source> specifies an existing mount point and I<target> "
2715 "specifies the new location. The move is atomic: at no point is the subtree "
2716 "unmounted. The I<filesystemtype>, I<mountflags>, and I<data> arguments are "
2721 #: build/C/man2/mount.2:148
2723 msgid "B<MS_NOATIME>"
2727 #: build/C/man2/mount.2:151
2728 msgid "Do not update access times for (all types of) files on this file system."
2732 #: build/C/man2/mount.2:151
2738 #: build/C/man2/mount.2:154
2739 msgid "Do not allow access to devices (special files) on this file system."
2743 #: build/C/man2/mount.2:154
2745 msgid "B<MS_NODIRATIME>"
2749 #: build/C/man2/mount.2:163
2751 "Do not update access times for directories on this file system. This flag "
2752 "provides a subset of the functionality provided by B<MS_NOATIME>; that is, "
2753 "B<MS_NOATIME> implies B<MS_NODIRATIME>."
2757 #: build/C/man2/mount.2:163
2759 msgid "B<MS_NOEXEC>"
2762 #. (Possibly useful for a file system that contains non-Linux executables.
2763 #. Often used as a security feature, e.g., to make sure that restricted
2764 #. users cannot execute files uploaded using ftp or so.)
2766 #: build/C/man2/mount.2:169
2767 msgid "Do not allow programs to be executed from this file system."
2771 #: build/C/man2/mount.2:169
2773 msgid "B<MS_NOSUID>"
2776 #. (This is a security feature to prevent users executing set-user-ID and
2777 #. set-group-ID programs from removable disk devices.)
2779 #: build/C/man2/mount.2:175
2781 "Do not honor set-user-ID and set-group-ID bits when executing programs from "
2786 #: build/C/man2/mount.2:175
2788 msgid "B<MS_RDONLY>"
2792 #. FIXME Document MS_REC, available since 2.4.11.
2793 #. This flag has meaning in conjunction with MS_BIND and
2794 #. also with the shared subtree flags.
2796 #: build/C/man2/mount.2:182
2797 msgid "Mount file system read-only."
2801 #: build/C/man2/mount.2:182
2803 msgid "B<MS_RELATIME> (Since Linux 2.6.20)"
2806 #. Matthew Garrett notes in the patch that added this behavior
2807 #. that this lets utilities such as tmpreaper (which deletes
2808 #. files based on last acces time) work correctly.
2810 #: build/C/man2/mount.2:203
2812 "When a file on this file system is accessed, only update the file's last "
2813 "access time (atime) if the current value of atime is less than or equal to "
2814 "the file's last modification time (mtime) or last status change time "
2815 "(ctime). This option is useful for programs, such as B<mutt>(1), that need "
2816 "to know when a file has been read since it was last modified. Since Linux "
2817 "2.6.30, the kernel defaults to the behavior provided by this flag (unless "
2818 "B<MS_NOATIME> was specified), and the B<MS_STRICTATIME> flag is required to "
2819 "obtain traditional semantics. In addition, since Linux 2.6.30, the file's "
2820 "last access time is always updated if it is more than 1 day old."
2824 #: build/C/man2/mount.2:203
2826 msgid "B<MS_REMOUNT>"
2830 #: build/C/man2/mount.2:219
2832 "Remount an existing mount. This allows you to change the I<mountflags> and "
2833 "I<data> of an existing mount without having to unmount and remount the file "
2834 "system. I<source> and I<target> should be the same values specified in the "
2835 "initial B<mount>() call; I<filesystemtype> is ignored."
2839 #: build/C/man2/mount.2:234
2841 "The following I<mountflags> can be changed: B<MS_RDONLY>, B<MS_SYNCHRONOUS>, "
2842 "B<MS_MANDLOCK>; before kernel 2.6.16, the following could also be changed: "
2843 "B<MS_NOATIME> and B<MS_NODIRATIME>; and, additionally, before kernel 2.4.10, "
2844 "the following could also be changed: B<MS_NOSUID>, B<MS_NODEV>, "
2849 #: build/C/man2/mount.2:234
2851 msgid "B<MS_SILENT> (since Linux 2.6.17)"
2855 #: build/C/man2/mount.2:242
2857 "Suppress the display of certain (I<printk>()) warning messages in the "
2858 "kernel log. This flag supersedes the misnamed and obsolete B<MS_VERBOSE> "
2859 "flag (available since Linux 2.4.12), which has the same meaning."
2863 #: build/C/man2/mount.2:242
2865 msgid "B<MS_STRICTATIME> (Since Linux 2.6.30)"
2869 #: build/C/man2/mount.2:252
2871 "Always update the last access time (atime) when files on this file system "
2872 "are accessed. (This was the default behavior before Linux 2.6.30.) "
2873 "Specifying this flag overrides the effect of setting the B<MS_NOATIME> and "
2874 "B<MS_RELATIME> flags."
2878 #: build/C/man2/mount.2:252
2880 msgid "B<MS_SYNCHRONOUS>"
2884 #: build/C/man2/mount.2:260
2886 "Make writes on this file system synchronous (as though the B<O_SYNC> flag to "
2887 "B<open>(2) was specified for all file opens to this file system)."
2891 #: build/C/man2/mount.2:272
2893 "From Linux 2.4 onward, the B<MS_NODEV>, B<MS_NOEXEC>, and B<MS_NOSUID> flags "
2894 "are settable on a per-mount-point basis. From kernel 2.6.16 onward, "
2895 "B<MS_NOATIME> and B<MS_NODIRATIME> are also settable on a per-mount-point "
2896 "basis. The B<MS_RELATIME> flag is also settable on a per-mount-point basis."
2900 #: build/C/man2/mount.2:281
2902 "The I<data> argument is interpreted by the different file systems. "
2903 "Typically it is a string of comma-separated options understood by this file "
2904 "system. See B<mount>(8) for details of the options available for each "
2909 #: build/C/man2/mount.2:286 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/umount.2:104
2911 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
2916 #: build/C/man2/mount.2:292
2918 "The error values given below result from filesystem type independent "
2919 "errors. Each file-system type may have its own special errors and its own "
2920 "special behavior. See the kernel source code for details."
2924 #: build/C/man2/mount.2:292 build/C/man2/spu_create.2:169 build/C/man2/stat.2:306 build/C/man2/statfs.2:133 build/C/man3/statvfs.3:100
2929 #. mtk: Probably: write permission is required for MS_BIND, with
2930 #. the error EPERM if not present; CAP_DAC_OVERRIDE is required.
2932 #: build/C/man2/mount.2:307
2934 "A component of a path was not searchable. (See also B<path_resolution>(7).) "
2935 "Or, mounting a read-only file system was attempted without giving the "
2936 "B<MS_RDONLY> flag. Or, the block device I<source> is located on a file "
2937 "system mounted with the B<MS_NODEV> option."
2941 #: build/C/man2/mount.2:307 build/C/man2/umount.2:117
2947 #: build/C/man2/mount.2:319
2949 "I<source> is already mounted. Or, it cannot be remounted read-only, because "
2950 "it still holds files open for writing. Or, it cannot be mounted on "
2951 "I<target> because I<target> is still busy (it is the working directory of "
2952 "some thread, the mount point of another device, has open files, etc.)."
2956 #: build/C/man2/mount.2:319 build/C/man2/spu_create.2:177 build/C/man2/spu_run.2:154 build/C/man2/stat.2:317 build/C/man2/statfs.2:145 build/C/man3/statvfs.3:112 build/C/man2/sysfs.2:78 build/C/man2/umount.2:121 build/C/man2/ustat.2:76
2962 #: build/C/man2/mount.2:322
2963 msgid "One of the pointer arguments points outside the user address space."
2967 #: build/C/man2/mount.2:337
2969 "I<source> had an invalid superblock. Or, a remount (B<MS_REMOUNT>) was "
2970 "attempted, but I<source> was not already mounted on I<target>. Or, a move "
2971 "(B<MS_MOVE>) was attempted, but I<source> was not a mount point, or was "
2976 #: build/C/man2/mount.2:337 build/C/man2/spu_create.2:188 build/C/man2/stat.2:320 build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
2982 #: build/C/man2/mount.2:344
2984 "Too many links encountered during pathname resolution. Or, a move was "
2985 "attempted, while I<target> is a descendant of I<source>."
2989 #: build/C/man2/mount.2:344 build/C/man2/spu_create.2:192
2995 #: build/C/man2/mount.2:348
2996 msgid "(In case no block device is required:) Table of dummy devices is full."
3000 #: build/C/man2/mount.2:348 build/C/man2/spu_create.2:195 build/C/man2/stat.2:323 build/C/man2/statfs.2:162 build/C/man3/statvfs.3:129 build/C/man2/umount.2:137
3002 msgid "B<ENAMETOOLONG>"
3006 #: build/C/man2/mount.2:352 build/C/man2/umount.2:141
3007 msgid "A pathname was longer than B<MAXPATHLEN>."
3011 #: build/C/man2/mount.2:352 build/C/man2/spu_create.2:202
3017 #: build/C/man2/mount.2:356
3018 msgid "I<filesystemtype> not configured in the kernel."
3022 #: build/C/man2/mount.2:356 build/C/man2/spu_create.2:206 build/C/man2/stat.2:327 build/C/man2/statfs.2:167 build/C/man3/statvfs.3:134 build/C/man2/umount.2:141
3028 #: build/C/man2/mount.2:359 build/C/man2/umount.2:144
3029 msgid "A pathname was empty or had a nonexistent component."
3033 #: build/C/man2/mount.2:359 build/C/man2/spu_create.2:211 build/C/man2/spu_run.2:175 build/C/man2/stat.2:334 build/C/man2/statfs.2:173 build/C/man3/statvfs.3:140 build/C/man2/umount.2:144
3039 #: build/C/man2/mount.2:362 build/C/man2/umount.2:147
3040 msgid "The kernel could not allocate a free page to copy filenames or data into."
3044 #: build/C/man2/mount.2:362
3050 #: build/C/man2/mount.2:366
3051 msgid "I<source> is not a block device (and a device was required)."
3055 #: build/C/man2/mount.2:366 build/C/man2/spu_create.2:224 build/C/man2/stat.2:337 build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
3061 #: build/C/man2/mount.2:372
3062 msgid "I<target>, or a prefix of I<source>, is not a directory."
3066 #: build/C/man2/mount.2:372
3072 #: build/C/man2/mount.2:377
3073 msgid "The major number of the block device I<source> is out of range."
3077 #: build/C/man2/mount.2:377 build/C/man2/spu_create.2:229 build/C/man2/umount.2:147
3083 #: build/C/man2/mount.2:380 build/C/man2/umount.2:150
3084 msgid "The caller does not have the required privileges."
3087 #. FIXME: Definitions of the so-far-undocumented MS_UNBINDABLE, MS_PRIVATE,
3088 #. MS_SHARED, and MS_SLAVE were (also) only added to glibc headers in 2.12.
3090 #: build/C/man2/mount.2:391
3092 "The definitions of B<MS_DIRSYNC>, B<MS_MOVE>, B<MS_REC>, B<MS_RELATIME>, and "
3093 "B<MS_STRICTATIME> were only added to glibc headers in version 2.12."
3097 #: build/C/man2/mount.2:394
3099 "This function is Linux-specific and should not be used in programs intended "
3104 #: build/C/man2/mount.2:403
3106 "The original B<MS_SYNC> flag was renamed B<MS_SYNCHRONOUS> in 1.1.69 when a "
3107 "different B<MS_SYNC> was added to I<E<lt>mman.hE<gt>>."
3110 #. The change is in patch-2.4.0-prerelease.
3112 #: build/C/man2/mount.2:412
3114 "Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program "
3115 "on a file system mounted with B<MS_NOSUID> would fail with B<EPERM>. Since "
3116 "Linux 2.4 the set-user-ID and set-group-ID bits are just silently ignored in "
3121 #: build/C/man2/mount.2:412
3123 msgid "Per-process Namespaces"
3127 #: build/C/man2/mount.2:423
3129 "Starting with kernel 2.4.19, Linux provides per-process mount namespaces. A "
3130 "mount namespace is the set of file system mounts that are visible to a "
3131 "process. Mount-point namespaces can be (and usually are) shared between "
3132 "multiple processes, and changes to the namespace (i.e., mounts and unmounts) "
3133 "by one process are visible to all other processes sharing the same "
3134 "namespace. (The pre-2.4.19 Linux situation can be considered as one in "
3135 "which a single namespace was shared by every process on the system.)"
3139 #: build/C/man2/mount.2:429
3141 "A child process created by B<fork>(2) shares its parent's mount namespace; "
3142 "the mount namespace is preserved across an B<execve>(2)."
3146 #: build/C/man2/mount.2:449
3148 "A process can obtain a private mount namespace if: it was created using the "
3149 "B<clone>(2) B<CLONE_NEWNS> flag, in which case its new namespace is "
3150 "initialized to be a I<copy> of the namespace of the process that called "
3151 "B<clone>(2); or it calls B<unshare>(2) with the B<CLONE_NEWNS> flag, which "
3152 "causes the caller's mount namespace to obtain a private copy of the "
3153 "namespace that it was previously sharing with other processes, so that "
3154 "future mounts and unmounts by the caller are invisible to other processes "
3155 "(except child processes that the caller subsequently creates) and vice "
3160 #: build/C/man2/mount.2:456
3162 "The Linux-specific I</proc/PID/mounts> file exposes the list of mount points "
3163 "in the mount namespace of the process with the specified ID; see B<proc>(5) "
3168 #: build/C/man2/mount.2:461
3169 msgid "B<umount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
3173 #: build/C/man7/path_resolution.7:23
3175 msgid "PATH_RESOLUTION"
3179 #: build/C/man7/path_resolution.7:23
3185 #: build/C/man7/path_resolution.7:26
3186 msgid "path_resolution - how a pathname is resolved to a file"
3190 #: build/C/man7/path_resolution.7:29
3192 "Some UNIX/Linux system calls have as parameter one or more filenames. A "
3193 "filename (or pathname) is resolved as follows."
3197 #: build/C/man7/path_resolution.7:29
3199 msgid "Step 1: Start of the resolution process"
3203 #: build/C/man7/path_resolution.7:48
3205 "If the pathname starts with the \\(aq/\\(aq character, the starting lookup "
3206 "directory is the root directory of the calling process. (A process inherits "
3207 "its root directory from its parent. Usually this will be the root directory "
3208 "of the file hierarchy. A process may get a different root directory by use "
3209 "of the B<chroot>(2) system call. A process may get an entirely private "
3210 "mount namespace in case it\\(emor one of its ancestors\\(emwas started by an "
3211 "invocation of the B<clone>(2) system call that had the B<CLONE_NEWNS> flag "
3212 "set.) This handles the \\(aq/\\(aq part of the pathname."
3216 #: build/C/man7/path_resolution.7:56
3218 "If the pathname does not start with the \\(aq/\\(aq character, the starting "
3219 "lookup directory of the resolution process is the current working directory "
3220 "of the process. (This is also inherited from the parent. It can be changed "
3221 "by use of the B<chdir>(2) system call.)"
3225 #: build/C/man7/path_resolution.7:59
3227 "Pathnames starting with a \\(aq/\\(aq character are called absolute "
3228 "pathnames. Pathnames not starting with a \\(aq/\\(aq are called relative "
3233 #: build/C/man7/path_resolution.7:59
3235 msgid "Step 2: Walk along the path"
3239 #: build/C/man7/path_resolution.7:64
3241 "Set the current lookup directory to the starting lookup directory. Now, for "
3242 "each nonfinal component of the pathname, where a component is a substring "
3243 "delimited by \\(aq/\\(aq characters, this component is looked up in the "
3244 "current lookup directory."
3248 #: build/C/man7/path_resolution.7:70
3250 "If the process does not have search permission on the current lookup "
3251 "directory, an B<EACCES> error is returned (\"Permission denied\")."
3255 #: build/C/man7/path_resolution.7:75
3257 "If the component is not found, an B<ENOENT> error is returned (\"No such "
3258 "file or directory\")."
3262 #: build/C/man7/path_resolution.7:80
3264 "If the component is found, but is neither a directory nor a symbolic link, "
3265 "an B<ENOTDIR> error is returned (\"Not a directory\")."
3269 #: build/C/man7/path_resolution.7:84
3271 "If the component is found and is a directory, we set the current lookup "
3272 "directory to that directory, and go to the next component."
3276 #. presently: max recursion depth during symlink resolution: 5
3277 #. max total number of symbolic links followed: 40
3278 #. _POSIX_SYMLOOP_MAX is 8
3280 #: build/C/man7/path_resolution.7:108
3282 "If the component is found and is a symbolic link (symlink), we first resolve "
3283 "this symbolic link (with the current lookup directory as starting lookup "
3284 "directory). Upon error, that error is returned. If the result is not a "
3285 "directory, an B<ENOTDIR> error is returned. If the resolution of the "
3286 "symlink is successful and returns a directory, we set the current lookup "
3287 "directory to that directory, and go to the next component. Note that the "
3288 "resolution process here involves recursion. In order to protect the kernel "
3289 "against stack overflow, and also to protect against denial of service, there "
3290 "are limits on the maximum recursion depth, and on the maximum number of "
3291 "symbolic links followed. An B<ELOOP> error is returned when the maximum is "
3292 "exceeded (\"Too many levels of symbolic links\")."
3296 #: build/C/man7/path_resolution.7:108
3298 msgid "Step 3: Find the final entry"
3302 #: build/C/man7/path_resolution.7:120
3304 "The lookup of the final component of the pathname goes just like that of all "
3305 "other components, as described in the previous step, with two differences: "
3306 "(i) the final component need not be a directory (at least as far as the path "
3307 "resolution process is concerned\\(emit may have to be a directory, or a "
3308 "nondirectory, because of the requirements of the specific system call), and "
3309 "(ii) it is not necessarily an error if the component is not found\\(emmaybe "
3310 "we are just creating it. The details on the treatment of the final entry "
3311 "are described in the manual pages of the specific system calls."
3315 #: build/C/man7/path_resolution.7:120
3321 #: build/C/man7/path_resolution.7:124
3323 "By convention, every directory has the entries \".\" and \"..\", which refer "
3324 "to the directory itself and to its parent directory, respectively."
3328 #: build/C/man7/path_resolution.7:128
3330 "The path resolution process will assume that these entries have their "
3331 "conventional meanings, regardless of whether they are actually present in "
3332 "the physical file system."
3336 #: build/C/man7/path_resolution.7:130
3337 msgid "One cannot walk down past the root: \"/..\" is the same as \"/\"."
3341 #: build/C/man7/path_resolution.7:130
3343 msgid "Mount points"
3347 #: build/C/man7/path_resolution.7:134
3349 "After a \"mount dev path\" command, the pathname \"path\" refers to the root "
3350 "of the file system hierarchy on the device \"dev\", and no longer to "
3351 "whatever it referred to earlier."
3355 #: build/C/man7/path_resolution.7:138
3357 "One can walk out of a mounted file system: \"path/..\" refers to the parent "
3358 "directory of \"path\", outside of the file system hierarchy on \"dev\"."
3362 #: build/C/man7/path_resolution.7:138
3364 msgid "Trailing slashes"
3368 #: build/C/man7/path_resolution.7:144
3370 "If a pathname ends in a \\(aq/\\(aq, that forces resolution of the preceding "
3371 "component as in Step 2: it has to exist and resolve to a directory. "
3372 "Otherwise a trailing \\(aq/\\(aq is ignored. (Or, equivalently, a pathname "
3373 "with a trailing \\(aq/\\(aq is equivalent to the pathname obtained by "
3374 "appending \\(aq.\\(aq to it.)"
3378 #: build/C/man7/path_resolution.7:144
3380 msgid "Final symlink"
3384 #: build/C/man7/path_resolution.7:153
3386 "If the last component of a pathname is a symbolic link, then it depends on "
3387 "the system call whether the file referred to will be the symbolic link or "
3388 "the result of path resolution on its contents. For example, the system call "
3389 "B<lstat>(2) will operate on the symlink, while B<stat>(2) operates on the "
3390 "file pointed to by the symlink."
3394 #: build/C/man7/path_resolution.7:153
3396 msgid "Length limit"
3400 #: build/C/man7/path_resolution.7:160
3402 "There is a maximum length for pathnames. If the pathname (or some "
3403 "intermediate pathname obtained while resolving symbolic links) is too long, "
3404 "an B<ENAMETOOLONG> error is returned (\"Filename too long\")."
3408 #: build/C/man7/path_resolution.7:160
3410 msgid "Empty pathname"
3414 #: build/C/man7/path_resolution.7:167
3416 "In the original UNIX, the empty pathname referred to the current directory. "
3417 "Nowadays POSIX decrees that an empty pathname must not be resolved "
3418 "successfully. Linux returns B<ENOENT> in this case."
3422 #: build/C/man7/path_resolution.7:167
3428 #: build/C/man7/path_resolution.7:180
3430 "The permission bits of a file consist of three groups of three bits, cf.\\& "
3431 "B<chmod>(1) and B<stat>(2). The first group of three is used when the "
3432 "effective user ID of the calling process equals the owner ID of the file. "
3433 "The second group of three is used when the group ID of the file either "
3434 "equals the effective group ID of the calling process, or is one of the "
3435 "supplementary group IDs of the calling process (as set by B<setgroups>(2)). "
3436 "When neither holds, the third group is used."
3440 #: build/C/man7/path_resolution.7:184
3442 "Of the three bits used, the first bit determines read permission, the second "
3443 "write permission, and the last execute permission in case of ordinary files, "
3444 "or search permission in case of directories."
3448 #: build/C/man7/path_resolution.7:189
3450 "Linux uses the fsuid instead of the effective user ID in permission checks. "
3451 "Ordinarily the fsuid will equal the effective user ID, but the fsuid can be "
3452 "changed by the system call B<setfsuid>(2)."
3456 #: build/C/man7/path_resolution.7:197
3458 "(Here \"fsuid\" stands for something like \"file system user ID\". The "
3459 "concept was required for the implementation of a user space NFS server at a "
3460 "time when processes could send a signal to a process with the same effective "
3461 "user ID. It is obsolete now. Nobody should use B<setfsuid>(2).)"
3464 #. FIXME say something about file system mounted read-only ?
3466 #: build/C/man7/path_resolution.7:203
3468 "Similarly, Linux uses the fsgid (\"file system group ID\") instead of the "
3469 "effective group ID. See B<setfsgid>(2)."
3473 #: build/C/man7/path_resolution.7:203
3475 msgid "Bypassing permission checks: superuser and capabilities"
3478 #. (but for exec at least one x bit must be set) -- AEB
3479 #. but there is variation across systems on this point: for
3480 #. example, HP-UX and Tru64 are as described by AEB. However,
3481 #. on some implementations (e.g., Solaris, FreeBSD),
3482 #. access(X_OK) by superuser will report success, regardless
3483 #. of the file's execute permission bits. -- MTK (Oct 05)
3485 #: build/C/man7/path_resolution.7:214
3487 "On a traditional UNIX system, the superuser (I<root>, user ID 0) is "
3488 "all-powerful, and bypasses all permissions restrictions when accessing "
3493 #: build/C/man7/path_resolution.7:220
3495 "On Linux, superuser privileges are divided into capabilities (see "
3496 "B<capabilities>(7)). Two capabilities are relevant for file permissions "
3497 "checks: B<CAP_DAC_OVERRIDE> and B<CAP_DAC_READ_SEARCH>. (A process has "
3498 "these capabilities if its fsuid is 0.)"
3502 #: build/C/man7/path_resolution.7:224
3504 "The B<CAP_DAC_OVERRIDE> capability overrides all permission checking, but "
3505 "only grants execute permission when at least one of the file's three execute "
3506 "permission bits is set."
3509 #. FIXME say something about immutable files
3510 #. FIXME say something about ACLs
3512 #: build/C/man7/path_resolution.7:229
3514 "The B<CAP_DAC_READ_SEARCH> capability grants read and search permission on "
3515 "directories, and read permission on ordinary files."
3519 #: build/C/man7/path_resolution.7:234
3520 msgid "B<readlink>(2), B<capabilities>(7), B<credentials>(7), B<symlink>(7)"
3524 #: build/C/man2/removexattr.2:27
3530 #: build/C/man2/removexattr.2:30
3531 msgid "removexattr, lremovexattr, fremovexattr - remove an extended attribute"
3535 #: build/C/man2/removexattr.2:39
3538 "B<int removexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3539 "B<int lremovexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3540 "B<int fremovexattr(int >I<fd>B<, const char\\ *>I<name>B<);>\n"
3544 #: build/C/man2/removexattr.2:51
3546 "Extended attributes are I<name>:value pairs associated with inodes (files, "
3547 "directories, symbolic links, etc.). They are extensions to the normal "
3548 "attributes which are associated with all inodes in the system (i.e., the "
3549 "B<stat>(2) data). A complete overview of extended attributes concepts can "
3550 "be found in B<attr>(5)."
3554 #: build/C/man2/removexattr.2:58
3556 "B<removexattr>() removes the extended attribute identified by I<name> and "
3557 "associated with the given I<path> in the file system."
3561 #: build/C/man2/removexattr.2:64
3563 "B<lremovexattr>() is identical to B<removexattr>(), except in the case of a "
3564 "symbolic link, where the extended attribute is removed from the link itself, "
3565 "not the file that it refers to."
3569 #: build/C/man2/removexattr.2:74
3571 "B<fremovexattr>() is identical to B<removexattr>(), only the extended "
3572 "attribute is removed from the open file referred to by I<fd> (as returned by "
3573 "B<open>(2)) in place of I<path>."
3577 #: build/C/man2/removexattr.2:80
3579 "An extended attribute name is a simple null-terminated string. The I<name> "
3580 "includes a namespace prefix; there may be several, disjoint namespaces "
3581 "associated with an individual inode."
3585 #: build/C/man2/removexattr.2:85 build/C/man2/setxattr.2:112
3587 "On success, zero is returned. On failure, -1 is returned and I<errno> is "
3588 "set appropriately."
3592 #: build/C/man2/removexattr.2:90
3593 msgid "If the named attribute does not exist, I<errno> is set to B<ENOATTR>."
3597 #: build/C/man2/removexattr.2:120
3599 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3600 "B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3604 #: build/C/man2/setxattr.2:27
3610 #: build/C/man2/setxattr.2:27
3616 #: build/C/man2/setxattr.2:30
3617 msgid "setxattr, lsetxattr, fsetxattr - set an extended attribute value"
3621 #: build/C/man2/setxattr.2:42
3624 "B<int setxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3625 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3627 "B<int lsetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3628 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3630 "B<int fsetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
3631 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3636 #: build/C/man2/setxattr.2:69
3638 "B<setxattr>() sets the I<value> of the extended attribute identified by "
3639 "I<name> and associated with the given I<path> in the file system. The "
3640 "I<size> of the I<value> must be specified."
3644 #: build/C/man2/setxattr.2:75
3646 "B<lsetxattr>() is identical to B<setxattr>(), except in the case of a "
3647 "symbolic link, where the extended attribute is set on the link itself, not "
3648 "the file that it refers to."
3652 #: build/C/man2/setxattr.2:85
3654 "B<fsetxattr>() is identical to B<setxattr>(), only the extended attribute "
3655 "is set on the open file referred to by I<fd> (as returned by B<open>(2)) in "
3660 #: build/C/man2/setxattr.2:95
3662 "An extended attribute name is a simple null-terminated string. The I<name> "
3663 "includes a namespace prefix; there may be several, disjoint namespaces "
3664 "associated with an individual inode. The I<value> of an extended attribute "
3665 "is a chunk of arbitrary textual or binary data of specified length."
3669 #: build/C/man2/setxattr.2:107
3671 "The I<flags> argument can be used to refine the semantics of the operation. "
3672 "B<XATTR_CREATE> specifies a pure create, which fails if the named attribute "
3673 "exists already. B<XATTR_REPLACE> specifies a pure replace operation, which "
3674 "fails if the named attribute does not already exist. By default (no flags), "
3675 "the extended attribute will be created if need be, or will simply replace "
3676 "the value if the attribute exists."
3680 #: build/C/man2/setxattr.2:125
3682 "If B<XATTR_CREATE> is specified, and the attribute exists already, I<errno> "
3683 "is set to B<EEXIST>. If B<XATTR_REPLACE> is specified, and the attribute "
3684 "does not exist, I<errno> is set to B<ENOATTR>."
3688 #: build/C/man2/setxattr.2:133
3690 "If there is insufficient space remaining to store the extended attribute, "
3691 "I<errno> is set to either B<ENOSPC>, or B<EDQUOT> if quota enforcement was "
3696 #: build/C/man2/setxattr.2:163
3698 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3699 "B<removexattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3703 #: build/C/man2/spu_create.2:24
3709 #: build/C/man2/spu_create.2:24 build/C/man7/spufs.7:26
3715 #: build/C/man2/spu_create.2:27
3716 msgid "spu_create - create a new spu context"
3720 #: build/C/man2/spu_create.2:31
3723 "B<#include E<lt>sys/types.hE<gt>>\n"
3724 "B<#include E<lt>sys/spu.hE<gt>>\n"
3728 #: build/C/man2/spu_create.2:35
3731 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3733 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3735 "B< int >I<neighbor_fd>B<);>\n"
3739 #: build/C/man2/spu_create.2:55
3741 "The B<spu_create>() system call is used on PowerPC machines that implement "
3742 "the Cell Broadband Engine Architecture in order to access Synergistic "
3743 "Processor Units (SPUs). It creates a new logical context for an SPU in "
3744 "I<pathname> and returns a file descriptor associated with it. I<pathname> "
3745 "must refer to a nonexistent directory in the mount point of the SPU file "
3746 "system (B<spufs>). If B<spu_create>() is successful, a directory is "
3747 "created at I<pathname> and it is populated with the files described in "
3752 #: build/C/man2/spu_create.2:74
3754 "When a context is created, the returned file descriptor can only be passed "
3755 "to B<spu_run>(2), used as the I<dirfd> argument to the B<*at> family of "
3756 "system calls (e.g., B<openat>(2)), or closed; other operations are not "
3757 "defined. A logical SPU context is destroyed (along with all files created "
3758 "within the context's I<pathname> directory) once the last reference to the "
3759 "context has gone; this usually occurs when the file descriptor returned by "
3760 "B<spu_create>() is closed."
3764 #: build/C/man2/spu_create.2:79
3766 "The I<flags> argument can be zero or any bitwise OR-ed combination of the "
3767 "following constants:"
3771 #: build/C/man2/spu_create.2:79
3773 msgid "B<SPU_CREATE_EVENTS_ENABLED>"
3777 #: build/C/man2/spu_create.2:85
3779 "Rather than using signals for reporting DMA errors, use the I<event> "
3780 "argument to B<spu_run>(2)."
3784 #: build/C/man2/spu_create.2:85
3786 msgid "B<SPU_CREATE_GANG>"
3790 #: build/C/man2/spu_create.2:93
3792 "Create an SPU gang instead of a context. (A gang is a group of SPU contexts "
3793 "that are functionally related to each other and which share common "
3794 "scheduling parameters\\(empriority and policy. In the future, gang "
3795 "scheduling may be implemented causing the group to be switched in and out as "
3800 #: build/C/man2/spu_create.2:100
3802 "A new directory will be created at the location specified by the I<pathname> "
3803 "argument. This gang may be used to hold other SPU contexts, by providing a "
3804 "pathname that is within the gang directory to further calls to "
3809 #: build/C/man2/spu_create.2:100
3811 msgid "B<SPU_CREATE_NOSCHED>"
3815 #: build/C/man2/spu_create.2:106
3817 "Create a context that is not affected by the SPU scheduler. Once the "
3818 "context is run, it will not be scheduled out until it is destroyed by the "
3823 #: build/C/man2/spu_create.2:117
3825 "Because the context cannot be removed from the SPU, some functionality is "
3826 "disabled for B<SPU_CREATE_NOSCHED> contexts. Only a subset of the files "
3827 "will be available in this context directory in B<spufs>. Additionally, "
3828 "B<SPU_CREATE_NOSCHED> contexts cannot dump a core file when crashing."
3832 #: build/C/man2/spu_create.2:123
3834 "Creating B<SPU_CREATE_NOSCHED> contexts requires the B<CAP_SYS_NICE> "
3839 #: build/C/man2/spu_create.2:123
3841 msgid "B<SPU_CREATE_ISOLATE>"
3845 #: build/C/man2/spu_create.2:130
3847 "Create an isolated SPU context. Isolated contexts are protected from some "
3848 "PPE (PowerPC Processing Element) operations, such as access to the SPU "
3849 "local store and the NPC register."
3853 #: build/C/man2/spu_create.2:136
3855 "Creating B<SPU_CREATE_ISOLATE> contexts also requires the "
3856 "B<SPU_CREATE_NOSCHED> flag."
3860 #: build/C/man2/spu_create.2:136
3862 msgid "B<SPU_CREATE_AFFINITY_SPU>"
3866 #: build/C/man2/spu_create.2:144
3868 "Create a context with affinity to another SPU context. This affinity "
3869 "information is used within the SPU scheduling algorithm. Using this flag "
3870 "requires that a file descriptor referring to the other SPU context be passed "
3871 "in the I<neighbor_fd> argument."
3875 #: build/C/man2/spu_create.2:144
3877 msgid "B<SPU_CREATE_AFFINITY_MEM>"
3881 #: build/C/man2/spu_create.2:149
3883 "Create a context with affinity to system memory. This affinity information "
3884 "is used within the SPU scheduling algorithm."
3888 #: build/C/man2/spu_create.2:161
3890 "The I<mode> argument (minus any bits set in the process's B<umask>(2)) "
3891 "specifies the permissions used for creating the new directory in B<spufs>. "
3892 "See B<stat>(2) for a full list of the possible I<mode> values."
3896 #: build/C/man2/spu_create.2:168
3898 "On success, B<spu_create>() returns a new file descriptor. On error, -1 is "
3899 "returned, and I<errno> is set to one of the error codes listed below."
3903 #: build/C/man2/spu_create.2:174
3904 msgid "The current user does not have write access to the B<spufs>(7) mount point."
3908 #: build/C/man2/spu_create.2:174
3914 #: build/C/man2/spu_create.2:177
3915 msgid "An SPU context already exists at the given path name."
3919 #: build/C/man2/spu_create.2:182
3921 "I<pathname> is not a valid string pointer in the calling process's address "
3926 #: build/C/man2/spu_create.2:188
3928 "I<pathname> is not a directory in the B<spufs>(7) mount point, or invalid "
3929 "flags have been provided."
3933 #: build/C/man2/spu_create.2:192
3934 msgid "Too many symbolic links were found while resolving I<pathname>."
3938 #: build/C/man2/spu_create.2:195
3939 msgid "The process has reached its maximum open files limit."
3943 #: build/C/man2/spu_create.2:199
3944 msgid "I<pathname> is too long."
3948 #: build/C/man2/spu_create.2:199
3954 #: build/C/man2/spu_create.2:202
3955 msgid "The system has reached the global open files limit."
3959 #: build/C/man2/spu_create.2:206
3961 "An isolated context was requested, but the hardware does not support SPU "
3966 #: build/C/man2/spu_create.2:211
3967 msgid "Part of I<pathname> could not be resolved."
3971 #: build/C/man2/spu_create.2:214
3972 msgid "The kernel could not allocate all resources required."
3976 #: build/C/man2/spu_create.2:214
3982 #: build/C/man2/spu_create.2:219
3984 "There are not enough SPU resources available to create a new context or the "
3985 "user-specific limit for the number of SPU contexts has been reached."
3989 #: build/C/man2/spu_create.2:219 build/C/man2/spu_run.2:179 build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143 build/C/man2/ustat.2:84
3995 #: build/C/man2/spu_create.2:224 build/C/man2/spu_run.2:184
3997 "The functionality is not provided by the current system, because either the "
3998 "hardware does not provide SPUs or the spufs module is not loaded."
4002 #: build/C/man2/spu_create.2:229
4003 msgid "A part of I<pathname> is not a directory."
4007 #: build/C/man2/spu_create.2:236
4009 "The I<SPU_CREATE_NOSCHED> flag has been given, but the user does not have "
4010 "the B<CAP_SYS_NICE> capability."
4014 #: build/C/man2/spu_create.2:242
4016 "I<pathname> must point to a location beneath the mount point of B<spufs>. "
4017 "By convention, it gets mounted in I</spu>."
4021 #: build/C/man2/spu_create.2:246
4022 msgid "The B<spu_create>() system call was added to Linux in kernel 2.6.16."
4026 #: build/C/man2/spu_create.2:250
4028 "This call is Linux-specific and only implemented on the PowerPC "
4029 "architecture. Programs using this system call are not portable."
4033 #: build/C/man2/spu_create.2:260
4035 "Glibc does not provide a wrapper for this system call; call it using "
4036 "B<syscall>(2). Note however, that B<spu_create>() is meant to be used from "
4037 "libraries that implement a more abstract interface to SPUs, not to be used "
4038 "from regular applications. See "
4039 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4044 #: build/C/man2/spu_create.2:265
4045 msgid "See B<spu_run>(2) for an example of the use of B<spu_create>()"
4049 #: build/C/man2/spu_create.2:270
4050 msgid "B<close>(2), B<spu_run>(2), B<capabilities>(7), B<spufs>(7)"
4054 #: build/C/man2/spu_run.2:25
4060 #: build/C/man2/spu_run.2:25
4066 #: build/C/man2/spu_run.2:28
4067 msgid "spu_run - execute an SPU context"
4071 #: build/C/man2/spu_run.2:31
4073 msgid "B<#include E<lt>sys/spu.hE<gt>>\n"
4077 #: build/C/man2/spu_run.2:34
4080 "B<int spu_run(int >I<fd>B<, unsigned int *>I<npc>B<, unsigned int "
4085 #: build/C/man2/spu_run.2:49
4087 "The B<spu_run>() system call is used on PowerPC machines that implement the "
4088 "Cell Broadband Engine Architecture in order to access Synergistic Processor "
4089 "Units (SPUs). The I<fd> argument is a file descriptor returned by "
4090 "B<spu_create>(2) that refers to a specific SPU context. When the context "
4091 "gets scheduled to a physical SPU, it starts execution at the instruction "
4092 "pointer passed in I<npc>."
4096 #: build/C/man2/spu_run.2:58
4098 "Execution of SPU code happens synchronously, meaning that B<spu_run>() "
4099 "blocks while the SPU is still running. If there is a need to execute SPU "
4100 "code in parallel with other code on either the main CPU or other SPUs, a new "
4101 "thread of execution must be created first (e.g., using "
4102 "B<pthread_create>(3))."
4106 #: build/C/man2/spu_run.2:68
4108 "When B<spu_run>() returns, the current value of the SPU program counter is "
4109 "written to I<npc>, so successive calls to B<spu_run>() can use the same "
4114 #: build/C/man2/spu_run.2:78
4116 "The I<event> argument provides a buffer for an extended status code. If the "
4117 "SPU context was created with the B<SPU_CREATE_EVENTS_ENABLED> flag, then "
4118 "this buffer is populated by the Linux kernel before B<spu_run>() returns."
4122 #: build/C/man2/spu_run.2:80
4123 msgid "The status code may be one (or more) of the following constants:"
4127 #: build/C/man2/spu_run.2:80
4129 msgid "B<SPE_EVENT_DMA_ALIGNMENT>"
4133 #: build/C/man2/spu_run.2:83
4134 msgid "A DMA alignment error occurred."
4138 #: build/C/man2/spu_run.2:83
4140 msgid "B<SPE_EVENT_INVALID_DMA>"
4144 #: build/C/man2/spu_run.2:86
4145 msgid "An invalid MFC DMA command was attempted."
4149 #: build/C/man2/spu_run.2:86
4151 msgid "B<SPE_EVENT_SPE_DATA_STORAGE>"
4155 #: build/C/man2/spu_run.2:89
4156 msgid "A DMA storage error occurred."
4160 #: build/C/man2/spu_run.2:89
4162 msgid "B<SPE_EVENT_SPE_ERROR>"
4166 #: build/C/man2/spu_run.2:92
4167 msgid "An illegal instruction was executed."
4171 #: build/C/man2/spu_run.2:98
4173 "NULL is a valid value for the I<event> argument. In this case, the events "
4174 "will not be reported to the calling process."
4178 #: build/C/man2/spu_run.2:107
4180 "On success, B<spu_run>() returns the value of the I<spu_status> register. "
4181 "On error it returns -1 and sets I<errno> to one of the error codes listed "
4186 #: build/C/man2/spu_run.2:116
4188 "The I<spu_status> register value is a bit mask of status codes and "
4189 "optionally a 14-bit code returned from the B<stop-and-signal> instruction on "
4190 "the SPU. The bit masks for the status codes are:"
4194 #: build/C/man2/spu_run.2:116
4200 #: build/C/man2/spu_run.2:121
4201 msgid "SPU was stopped by a B<stop-and-signal> instruction."
4205 #: build/C/man2/spu_run.2:121
4211 #: build/C/man2/spu_run.2:126
4212 msgid "SPU was stopped by a B<halt> instruction."
4216 #: build/C/man2/spu_run.2:126
4222 #: build/C/man2/spu_run.2:129
4223 msgid "SPU is waiting for a channel."
4227 #: build/C/man2/spu_run.2:129
4233 #: build/C/man2/spu_run.2:132
4234 msgid "SPU is in single-step mode."
4238 #: build/C/man2/spu_run.2:132
4244 #: build/C/man2/spu_run.2:135
4245 msgid "SPU has tried to execute an invalid instruction."
4249 #: build/C/man2/spu_run.2:135
4255 #: build/C/man2/spu_run.2:138
4256 msgid "SPU has tried to access an invalid channel."
4260 #: build/C/man2/spu_run.2:138
4262 msgid "B<0x3fff0000>"
4266 #: build/C/man2/spu_run.2:144
4268 "The bits masked with this value contain the code returned from a "
4269 "B<stop-and-signal> instruction. These bits are only valid if the 0x02 bit "
4274 #: build/C/man2/spu_run.2:149
4276 "If B<spu_run>() has not returned an error, one or more bits among the lower "
4277 "eight ones are always set."
4281 #: build/C/man2/spu_run.2:150 build/C/man2/stat.2:313 build/C/man2/statfs.2:140 build/C/man3/statvfs.3:107
4287 #: build/C/man2/spu_run.2:154
4288 msgid "I<fd> is not a valid file descriptor."
4292 #: build/C/man2/spu_run.2:160
4294 "I<npc> is not a valid pointer, or I<event> is non-NULL and an invalid "
4299 #: build/C/man2/spu_run.2:160 build/C/man2/statfs.2:151 build/C/man3/statvfs.3:118
4305 #: build/C/man2/spu_run.2:170
4307 "A signal occurred while B<spu_run>() was in progress; see B<signal>(7). "
4308 "The I<npc> value has been updated to the new program counter value if "
4313 #: build/C/man2/spu_run.2:175
4314 msgid "I<fd> is not a valid file descriptor returned from B<spu_create>(2)."
4318 #: build/C/man2/spu_run.2:179
4320 "There was not enough memory available to handle a page fault resulting from "
4321 "a Memory Flow Controller (MFC) direct memory access."
4325 #: build/C/man2/spu_run.2:188
4326 msgid "The B<spu_run>() system call was added to Linux in kernel 2.6.16."
4330 #: build/C/man2/spu_run.2:192
4332 "This call is Linux-specific and only implemented by the PowerPC "
4333 "architecture. Programs using this system call are not portable."
4337 #: build/C/man2/spu_run.2:202
4339 "Glibc does not provide a wrapper for this system call; call it using "
4340 "B<syscall>(2). Note however, that B<spu_run>() is meant to be used from "
4341 "libraries that implement a more abstract interface to SPUs, not to be used "
4342 "from regular applications. See "
4343 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4348 #: build/C/man2/spu_run.2:207
4350 "The following is an example of running a simple, one-instruction SPU program "
4351 "with the B<spu_run>() system call."
4355 #: build/C/man2/spu_run.2:215
4358 "#include E<lt>stdlib.hE<gt>\n"
4359 "#include E<lt>stdint.hE<gt>\n"
4360 "#include E<lt>unistd.hE<gt>\n"
4361 "#include E<lt>stdio.hE<gt>\n"
4362 "#include E<lt>sys/types.hE<gt>\n"
4363 "#include E<lt>fcntl.hE<gt>\n"
4367 #: build/C/man2/spu_run.2:218
4370 "#define handle_error(msg) \\e\n"
4371 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4375 #: build/C/man2/spu_run.2:223
4380 " int context, fd, spu_status;\n"
4381 " uint32_t instruction, npc;\n"
4385 #: build/C/man2/spu_run.2:227
4388 " context = spu_create(\"/spu/example-context\", 0, 0755);\n"
4389 " if (context == -1)\n"
4390 " handle_error(\"spu_create\");\n"
4394 #: build/C/man2/spu_run.2:232
4397 " /* write a \\(aqstop 0x1234\\(aq instruction to the SPU\\(aqs\n"
4398 " * local store memory\n"
4400 " instruction = 0x00001234;\n"
4404 #: build/C/man2/spu_run.2:237
4407 " fd = open(\"/spu/example-context/mem\", O_RDWR);\n"
4409 " handle_error(\"open\");\n"
4410 " write(fd, &instruction, sizeof(instruction));\n"
4414 #: build/C/man2/spu_run.2:243
4417 " /* set npc to the starting instruction address of the\n"
4418 " * SPU program. Since we wrote the instruction at the\n"
4419 " * start of the mem file, the entry point will be 0x0\n"
4425 #: build/C/man2/spu_run.2:247
4428 " spu_status = spu_run(context, &npc, NULL);\n"
4429 " if (spu_status == -1)\n"
4430 " handle_error(\"open\");\n"
4434 #: build/C/man2/spu_run.2:253
4437 " /* we should see a status code of 0x1234002:\n"
4438 " * 0x00000002 (spu was stopped due to stop-and-signal)\n"
4439 " * | 0x12340000 (the stop-and-signal code)\n"
4441 " printf(\"SPU Status: 0x%08x\\en\", spu_status);\n"
4445 #: build/C/man2/spu_run.2:256 build/C/man2/stat.2:648
4448 " exit(EXIT_SUCCESS);\n"
4453 #: build/C/man2/spu_run.2:264
4454 msgid "B<close>(2), B<spu_create>(2), B<capabilities>(7), B<spufs>(7)"
4458 #: build/C/man7/spufs.7:26
4464 #: build/C/man7/spufs.7:29
4465 msgid "spufs - SPU file system"
4469 #: build/C/man7/spufs.7:33
4471 "The SPU file system is used on PowerPC machines that implement the Cell "
4472 "Broadband Engine Architecture in order to access Synergistic Processor Units "
4477 #: build/C/man7/spufs.7:42
4479 "The file system provides a name space similar to POSIX shared memory or "
4480 "message queues. Users that have write permissions on the file system can "
4481 "use B<spu_create>(2) to establish SPU contexts under the B<spufs> root "
4486 #: build/C/man7/spufs.7:49
4488 "Every SPU context is represented by a directory containing a predefined set "
4489 "of files. These files can be used for manipulating the state of the logical "
4490 "SPU. Users can change permissions on the files, but can't add or remove "
4495 #: build/C/man7/spufs.7:49
4497 msgid "Mount Options"
4501 #: build/C/man7/spufs.7:50
4503 msgid "B<uid=E<lt>uidE<gt>>"
4507 #: build/C/man7/spufs.7:53
4508 msgid "Set the user owning the mount point; the default is 0 (root)."
4512 #: build/C/man7/spufs.7:53
4514 msgid "B<gid=E<lt>gidE<gt>>"
4518 #: build/C/man7/spufs.7:56
4519 msgid "Set the group owning the mount point; the default is 0 (root)."
4523 #: build/C/man7/spufs.7:56
4525 msgid "B<mode=E<lt>modeE<gt>>"
4529 #: build/C/man7/spufs.7:62
4531 "Set the mode of the top-level directory in B<spufs>, as an octal mode "
4532 "string. The default is 0775."
4536 #: build/C/man7/spufs.7:62
4542 #: build/C/man7/spufs.7:74
4544 "The files in B<spufs> mostly follow the standard behavior for regular system "
4545 "calls like B<read>(2) or B<write>(2), but often support only a subset of "
4546 "the operations supported on regular file systems. This list details the "
4547 "supported operations and the deviations from the standard behavior described "
4548 "in the respective man pages."
4552 #: build/C/man7/spufs.7:96
4554 "All files that support the B<read>(2) operation also support B<readv>(2) "
4555 "and all files that support the B<write>(2) operation also support "
4556 "B<writev>(2). All files support the B<access>(2) and B<stat>(2) family of "
4557 "operations, but for the latter call, the only fields of the returned I<stat> "
4558 "structure that contain reliable information are I<st_mode>, I<st_nlink>, "
4559 "I<st_uid>, and I<st_gid>."
4563 #: build/C/man7/spufs.7:105
4565 "All files support the B<chmod>(2)/B<fchmod>(2) and B<chown>(2)/B<fchown>(2) "
4566 "operations, but will not be able to grant permissions that contradict the "
4567 "possible operations (e.g., read access on the I<wbox> file)."
4571 #: build/C/man7/spufs.7:107
4572 msgid "The current set of files is:"
4576 #: build/C/man7/spufs.7:107
4578 msgid "I</capabilities>"
4582 #: build/C/man7/spufs.7:112
4584 "Contains a comma-delimited string representing the capabilities of this SPU "
4585 "context. Possible capabilities are:"
4589 #: build/C/man7/spufs.7:113
4595 #: build/C/man7/spufs.7:116
4596 msgid "This context may be scheduled."
4600 #: build/C/man7/spufs.7:116
4606 #: build/C/man7/spufs.7:119
4607 msgid "This context can be run in single-step mode, for debugging."
4611 #: build/C/man7/spufs.7:121
4612 msgid "New capabilities flags may be added in the future."
4616 #: build/C/man7/spufs.7:122
4622 #: build/C/man7/spufs.7:131
4624 "the contents of the local storage memory of the SPU. This can be accessed "
4625 "like a regular shared memory file and contains both code and data in the "
4626 "address space of the SPU. The possible operations on an open I<mem> file "
4631 #: build/C/man7/spufs.7:132
4633 msgid "B<read>(2), B<pread>(2), B<write>(2), B<pwrite>(2), B<lseek>(2)"
4637 #: build/C/man7/spufs.7:143
4639 "These operate as usual, with the exception that B<lseek>(2), B<write>(2), "
4640 "and B<pwrite>(2) are not supported beyond the end of the file. The file "
4641 "size is the size of the local storage of the SPU, which is normally 256 "
4646 #: build/C/man7/spufs.7:143 build/C/man7/spufs.7:705 build/C/man7/spufs.7:724
4652 #: build/C/man7/spufs.7:152
4654 "Mapping I<mem> into the process address space provides access to the SPU "
4655 "local storage within the process address space. Only B<MAP_SHARED> mappings "
4660 #: build/C/man7/spufs.7:153
4666 #: build/C/man7/spufs.7:160
4668 "Contains the saved general-purpose registers of the SPU context. This file "
4669 "contains the 128-bit values of each register, from register 0 to register "
4670 "127, in order. This allows the general-purpose registers to be inspected "
4675 #: build/C/man7/spufs.7:164
4677 "Reading to or writing from this file requires that the context is scheduled "
4678 "out, so use of this file is not recommended in normal program operation."
4682 #: build/C/man7/spufs.7:170
4684 "The I<regs> file is not present on contexts that have been created with the "
4685 "B<SPU_CREATE_NOSCHED> flag."
4689 #: build/C/man7/spufs.7:170
4695 #: build/C/man7/spufs.7:180
4697 "The first SPU-to-CPU communication mailbox. This file is read-only and can "
4698 "be read in units of 4 bytes. The file can only be used in nonblocking mode "
4699 "- even B<poll>(2) cannot be used to block on this file. The only possible "
4700 "operation on an open I<mbox> file is:"
4704 #: build/C/man7/spufs.7:181 build/C/man7/spufs.7:221 build/C/man7/spufs.7:316 build/C/man7/spufs.7:380 build/C/man7/spufs.7:417 build/C/man7/spufs.7:462 build/C/man7/spufs.7:516 build/C/man7/spufs.7:631 build/C/man7/spufs.7:675 build/C/man7/spufs.7:753
4710 #: build/C/man7/spufs.7:199
4712 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4713 "to B<EINVAL>. If there is no data available in the mailbox (i.e., the SPU "
4714 "has not sent a mailbox message), the return value is set to -1 and I<errno> "
4715 "is set to B<EAGAIN>. When data has been read successfully, four bytes are "
4716 "placed in the data buffer and the value four is returned."
4720 #: build/C/man7/spufs.7:200
4726 #: build/C/man7/spufs.7:216
4728 "The second SPU-to-CPU communication mailbox. This file is similar to the "
4729 "first mailbox file, but can be read in blocking I/O mode, thus calling "
4730 "B<read>(2) on an open I<ibox> file will block until the SPU has written "
4731 "data to its interrupt mailbox channel (unless the file has been opened with "
4732 "B<O_NONBLOCK>, see below). Also, B<poll>(2) and similar system calls can "
4733 "be used to monitor for the presence of mailbox data."
4737 #: build/C/man7/spufs.7:220
4738 msgid "The possible operations on an open I<ibox> file are:"
4742 #: build/C/man7/spufs.7:238
4744 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4745 "to B<EINVAL>. If there is no data available in the mailbox and the file "
4746 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4747 "and I<errno> is set to B<EAGAIN>."
4751 #: build/C/man7/spufs.7:246
4753 "If there is no data available in the mailbox and the file descriptor has "
4754 "been opened without B<O_NONBLOCK>, the call will block until the SPU writes "
4755 "to its interrupt mailbox channel. When data has been read successfully, "
4756 "four bytes are placed in the data buffer and the value four is returned."
4760 #: build/C/man7/spufs.7:246 build/C/man7/spufs.7:294 build/C/man7/spufs.7:684
4766 #: build/C/man7/spufs.7:253
4768 "Poll on the I<ibox> file returns I<(POLLIN | POLLRDNORM)> whenever data is "
4769 "available for reading."
4773 #: build/C/man7/spufs.7:254
4779 #: build/C/man7/spufs.7:266
4781 "The CPU-to-SPU communication mailbox. It is write-only and can be written "
4782 "in units of four bytes. If the mailbox is full, B<write>(2) will block, "
4783 "and B<poll>(2) can be used to block until the mailbox is available for "
4784 "writing again. The possible operations on an open I<wbox> file are:"
4788 #: build/C/man7/spufs.7:267 build/C/man7/spufs.7:391 build/C/man7/spufs.7:431 build/C/man7/spufs.7:475 build/C/man7/spufs.7:526 build/C/man7/spufs.7:637 build/C/man7/spufs.7:651 build/C/man7/spufs.7:748
4794 #: build/C/man7/spufs.7:285
4796 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
4797 "to B<EINVAL>. If there is no space available in the mailbox and the file "
4798 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4799 "and I<errno> is set to B<EAGAIN>."
4803 #: build/C/man7/spufs.7:294
4805 "If there is no space available in the mailbox and the file descriptor has "
4806 "been opened without B<O_NONBLOCK>, the call will block until the SPU reads "
4807 "from its PPE (PowerPC Processing Element) mailbox channel. When data has "
4808 "been written successfully, the system call returns four as its function "
4813 #: build/C/man7/spufs.7:301
4815 "A poll on the I<wbox> file returns I<(POLLOUT | POLLWRNORM)> whenever space "
4816 "is available for writing."
4820 #: build/C/man7/spufs.7:302
4822 msgid "I</mbox_stat>, I</ibox_stat>, I</wbox_stat>"
4826 #: build/C/man7/spufs.7:315
4828 "These are read-only files that contain the length of the current queue of "
4829 "each mailbox, i.e., how many words can be read from I<mbox> or I<ibox> or "
4830 "how many words can be written to I<wbox> without blocking. The files can be "
4831 "read only in four-byte units and return a big-endian binary integer number. "
4832 "The only possible operation on an open I<*box_stat> file is:"
4836 #: build/C/man7/spufs.7:336
4838 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4839 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer. "
4840 "This value is the number of elements that can be read from (for I<mbox_stat> "
4841 "and I<ibox_stat>) or written to (for I<wbox_stat>) the respective mailbox "
4842 "without blocking or returning an B<EAGAIN> error."
4846 #: build/C/man7/spufs.7:337
4849 "I</npc>, I</decr>, I</decr_status>, I</spu_tag_mask>, I</event_mask>, "
4850 "I</event_status>, I</srr0>, I</lslr>"
4854 #: build/C/man7/spufs.7:349
4856 "Internal registers of the SPU. These files contain an ASCII string "
4857 "representing the hex value of the specified register. Reads and writes on "
4858 "these files (except for I<npc>, see below) require that the SPU context be "
4859 "scheduled out, so frequent access to these files is not recommended for "
4860 "normal program operation."
4864 #: build/C/man7/spufs.7:351
4865 msgid "The contents of these files are:"
4869 #: build/C/man7/spufs.7:352
4875 #: build/C/man7/spufs.7:355
4876 msgid "Next Program Counter - only valid when the SPU is in a stopped state."
4880 #: build/C/man7/spufs.7:355
4886 #: build/C/man7/spufs.7:358
4887 msgid "SPU Decrementer"
4891 #: build/C/man7/spufs.7:358
4893 msgid "I<decr_status>"
4897 #: build/C/man7/spufs.7:361
4898 msgid "Decrementer Status"
4902 #: build/C/man7/spufs.7:361
4904 msgid "I<spu_tag_mask>"
4908 #: build/C/man7/spufs.7:364
4909 msgid "MFC tag mask for SPU DMA"
4913 #: build/C/man7/spufs.7:364
4915 msgid "I<event_mask>"
4919 #: build/C/man7/spufs.7:367
4920 msgid "Event mask for SPU interrupts"
4924 #: build/C/man7/spufs.7:367
4926 msgid "I<event_status>"
4930 #: build/C/man7/spufs.7:370
4931 msgid "Number of SPU events pending (read-only)"
4935 #: build/C/man7/spufs.7:370
4941 #: build/C/man7/spufs.7:373
4942 msgid "Interrupt Return address register"
4946 #: build/C/man7/spufs.7:373
4952 #: build/C/man7/spufs.7:376
4953 msgid "Local Store Limit Register"
4957 #: build/C/man7/spufs.7:379
4958 msgid "The possible operations on these files are:"
4962 #: build/C/man7/spufs.7:387
4964 "Reads the current register value. If the register value is larger than the "
4965 "buffer passed to the B<read>(2) system call, subsequent reads will continue "
4966 "reading from the same buffer, until the end of the buffer is reached."
4970 #: build/C/man7/spufs.7:391
4972 "When a complete string has been read, all subsequent read operations will "
4973 "return zero bytes and a new file descriptor needs to be opened to read a new "
4978 #: build/C/man7/spufs.7:401 build/C/man7/spufs.7:536
4980 "A B<write>(2) operation on the file sets the register to the value given in "
4981 "the string. The string is parsed from the beginning until the first "
4982 "nonnumeric character or the end of the buffer. Subsequent writes to the "
4983 "same file descriptor overwrite the previous setting."
4987 #: build/C/man7/spufs.7:408
4989 "Except for the I<npc> file, these files are not present on contexts that "
4990 "have been created with the B<SPU_CREATE_NOSCHED> flag."
4994 #: build/C/man7/spufs.7:409
5000 #: build/C/man7/spufs.7:416
5002 "This file provides access to the Floating Point Status and Control Register "
5003 "(fcpr) as a binary, four-byte file. The operations on the I<fpcr> file are:"
5007 #: build/C/man7/spufs.7:431
5009 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5010 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5011 "this is the current value of the I<fpcr> register."
5015 #: build/C/man7/spufs.7:445
5017 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5018 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5019 "updating the value of the I<fpcr> register."
5023 #: build/C/man7/spufs.7:446
5025 msgid "I</signal1>, I</signal2>"
5029 #: build/C/man7/spufs.7:461
5031 "The files provide access to the two signal notification channels of an SPU. "
5032 "These are read-write files that operate on four-byte words. Writing to one "
5033 "of these files triggers an interrupt on the SPU. The value written to the "
5034 "signal files can be read from the SPU through a channel read or from host "
5035 "user space through the file. After the value has been read by the SPU, it "
5036 "is reset to zero. The possible operations on an open I<signal1> or "
5037 "I<signal2> file are:"
5041 #: build/C/man7/spufs.7:475
5043 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5044 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5045 "this is the current value of the specified signal notification register."
5049 #: build/C/man7/spufs.7:496
5051 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5052 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5053 "updating the value of the specified signal notification register. The "
5054 "signal notification register will either be replaced with the input data or "
5055 "will be updated to the bitwise OR operation of the old value and the input "
5056 "data, depending on the contents of the I<signal1_type> or I<signal2_type> "
5057 "files respectively."
5061 #: build/C/man7/spufs.7:497
5063 msgid "I</signal1_type>, I</signal2_type>"
5067 #: build/C/man7/spufs.7:515
5069 "These two files change the behavior of the I<signal1> and I<signal2> "
5070 "notification files. They contain a numeric ASCII string which is read as "
5071 "either \"1\" or \"0\". In mode 0 (overwrite), the hardware replaces the "
5072 "contents of the signal channel with the data that is written to it. In mode "
5073 "1 (logical OR), the hardware accumulates the bits that are subsequently "
5074 "written to it. The possible operations on an open I<signal1_type> or "
5075 "I<signal2_type> file are:"
5079 #: build/C/man7/spufs.7:526
5081 "When the count supplied to the B<read>(2) call is shorter than the required "
5082 "length for the digit (plus a newline character), subsequent reads from the "
5083 "same file descriptor will complete the string. When a complete string has "
5084 "been read, all subsequent read operations will return zero bytes and a new "
5085 "file descriptor needs to be opened to read the value again."
5089 #: build/C/man7/spufs.7:537
5091 msgid "I</mbox_info>, I</ibox_info>, I</wbox_info>, I</dma_into>, I</proxydma_info>"
5095 #: build/C/man7/spufs.7:556
5097 "Read-only files that contain the saved state of the SPU mailboxes and DMA "
5098 "queues. This allows the SPU status to be inspected, mainly for debugging. "
5099 "The I<mbox_info> and I<ibox_info> files each contain the four-byte mailbox "
5100 "message that has been written by the SPU. If no message has been written to "
5101 "these mailboxes, then contents of these files is undefined. The "
5102 "I<mbox_stat>, I<ibox_stat> and I<wbox_stat> files contain the available "
5107 #: build/C/man7/spufs.7:565
5109 "The I<wbox_info> file contains an array of four-byte mailbox messages, which "
5110 "have been sent to the SPU. With current CBEA machines, the array is four "
5111 "items in length, so up to 4 * 4 = 16 bytes can be read from this file. If "
5112 "any mailbox queue entry is empty, then the bytes read at the corresponding "
5113 "location are undefined."
5117 #: build/C/man7/spufs.7:570
5119 "The I<dma_info> file contains the contents of the SPU MFC DMA queue, "
5120 "represented as the following structure:"
5124 #: build/C/man7/spufs.7:581
5127 "struct spu_dma_info {\n"
5128 " uint64_t dma_info_type;\n"
5129 " uint64_t dma_info_mask;\n"
5130 " uint64_t dma_info_status;\n"
5131 " uint64_t dma_info_stall_and_notify;\n"
5132 " uint64_t dma_info_atomic_command_status;\n"
5133 " struct mfc_cq_sr dma_info_command_data[16];\n"
5138 #: build/C/man7/spufs.7:589
5140 "The last member of this data structure is the actual DMA queue, containing "
5141 "16 entries. The I<mfc_cq_sr> structure is defined as:"
5145 #: build/C/man7/spufs.7:598
5148 "struct mfc_cq_sr {\n"
5149 " uint64_t mfc_cq_data0_RW;\n"
5150 " uint64_t mfc_cq_data1_RW;\n"
5151 " uint64_t mfc_cq_data2_RW;\n"
5152 " uint64_t mfc_cq_data3_RW;\n"
5157 #: build/C/man7/spufs.7:606
5159 "The I<proxydma_info> file contains similar information, but describes the "
5160 "proxy DMA queue (i.e., DMAs initiated by entities outside the SPU) instead. "
5161 "The file is in the following format:"
5165 #: build/C/man7/spufs.7:615
5168 "struct spu_proxydma_info {\n"
5169 " uint64_t proxydma_info_type;\n"
5170 " uint64_t proxydma_info_mask;\n"
5171 " uint64_t proxydma_info_status;\n"
5172 " struct mfc_cq_sr proxydma_info_command_data[8];\n"
5177 #: build/C/man7/spufs.7:621
5179 "Accessing these files requires that the SPU context is scheduled out - "
5180 "frequent use can be inefficient. These files should not be used for normal "
5181 "program operation."
5185 #: build/C/man7/spufs.7:625
5187 "These files are not present on contexts that have been created with the "
5188 "B<SPU_CREATE_NOSCHED> flag."
5192 #: build/C/man7/spufs.7:625
5198 #: build/C/man7/spufs.7:630
5200 "This file provides access to the SPU Run Control and SPU status registers, "
5201 "as an ASCII string. The following operations are supported:"
5205 #: build/C/man7/spufs.7:637
5207 "Reads from the I<cntl> file will return an ASCII string with the hex value "
5208 "of the SPU Status register."
5212 #: build/C/man7/spufs.7:642
5213 msgid "Writes to the I<cntl> file will set the context's SPU Run Control register."
5217 #: build/C/man7/spufs.7:643
5223 #: build/C/man7/spufs.7:650
5225 "Provides access to the Memory Flow Controller of the SPU. Reading from the "
5226 "file returns the contents of the SPU's MFC Tag Status register, and writing "
5227 "to the file initiates a DMA from the MFC. The following operations are "
5232 #: build/C/man7/spufs.7:655
5234 "Writes to this file need to be in the format of a MFC DMA command, defined "
5239 #: build/C/man7/spufs.7:667
5242 "struct mfc_dma_command {\n"
5243 " int32_t pad; /* reserved */\n"
5244 " uint32_t lsa; /* local storage address */\n"
5245 " uint64_t ea; /* effective address */\n"
5246 " uint16_t size; /* transfer size */\n"
5247 " uint16_t tag; /* command tag */\n"
5248 " uint16_t class; /* class ID */\n"
5249 " uint16_t cmd; /* command opcode */\n"
5254 #: build/C/man7/spufs.7:675
5256 "Writes are required to be exactly I<sizeof(struct mfc_dma_command)> bytes in "
5257 "size. The command will be sent to the SPU's MFC proxy queue, and the tag "
5258 "stored in the kernel (see below)."
5262 #: build/C/man7/spufs.7:684
5264 "Reads the contents of the tag status register. If the file is opened in "
5265 "blocking mode (i.e., without B<O_NONBLOCK>), then the read will block until "
5266 "a DMA tag (as performed by a previous write) is complete. In nonblocking "
5267 "mode, the MFC tag status register will be returned without waiting."
5271 #: build/C/man7/spufs.7:697
5273 "Calling B<poll>(2) on the I<mfc> file will block until a new DMA can be "
5274 "started (by checking for B<POLLOUT>) or until a previously started DMA (by "
5275 "checking for B<POLLIN>) has been completed."
5279 #: build/C/man7/spufs.7:703
5281 "I</mss> Provides access to the MFC MultiSource Synchronization (MSS) "
5282 "facility. By B<mmap>(2)-ing this file, processes can access the MSS area of "
5287 #: build/C/man7/spufs.7:705 build/C/man7/spufs.7:723
5288 msgid "The following operations are supported:"
5292 #: build/C/man7/spufs.7:714
5294 "Mapping B<mss> into the process address space gives access to the SPU MSS "
5295 "area within the process address space. Only B<MAP_SHARED> mappings are "
5300 #: build/C/man7/spufs.7:715
5306 #: build/C/man7/spufs.7:721
5308 "Provides access to the whole problem-state mapping of the SPU. Applications "
5309 "can use this area to interface to the SPU, rather than writing to individual "
5310 "register files in B<spufs>."
5314 #: build/C/man7/spufs.7:732
5316 "Mapping B<psmap> gives a process a direct map of the SPU problem state "
5317 "area. Only B<MAP_SHARED> mappings are supported."
5321 #: build/C/man7/spufs.7:733
5327 #: build/C/man7/spufs.7:739
5329 "Read-only file containing the physical SPU number that the SPU context is "
5330 "running on. When the context is not running, this file contains the string "
5335 #: build/C/man7/spufs.7:741
5336 msgid "The physical SPU number is given by an ASCII hex string."
5340 #: build/C/man7/spufs.7:741
5342 msgid "I</object-id>"
5346 #: build/C/man7/spufs.7:747
5348 "Allows applications to store (or retrieve) a single 64-bit ID into the "
5349 "context. This ID is later used by profiling tools to uniquely identify the "
5354 #: build/C/man7/spufs.7:753
5356 "By writing an ASCII hex value into this file, applications can set the "
5357 "object ID of the SPU context. Any previous value of the object ID is "
5362 #: build/C/man7/spufs.7:757
5364 "Reading this file gives an ASCII hex string representing the object ID for "
5369 #: build/C/man7/spufs.7:759
5371 msgid "I</etc/fstab> entry"
5375 #. Arnd Bergmann <arndb@de.ibm.com>, Mark Nutter <mnutter@us.ibm.com>,
5376 #. Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Jeremy Kerr <jk@ozlabs.org>
5378 #: build/C/man7/spufs.7:765
5379 msgid "none \t/spu \tspufs \tgid=spu \t0\t0"
5383 #: build/C/man7/spufs.7:771
5385 "B<close>(2), B<spu_create>(2), B<spu_run>(2), B<capabilities>(7), I<The Cell "
5386 "Broadband Engine Architecture (CBEA) specification>"
5390 #: build/C/man2/stat.2:40
5396 #: build/C/man2/stat.2:40
5402 #: build/C/man2/stat.2:43
5403 msgid "stat, fstat, lstat - get file status"
5407 #: build/C/man2/stat.2:45
5408 msgid "B<#include E<lt>sys/types.hE<gt>>"
5412 #: build/C/man2/stat.2:47
5413 msgid "B<#include E<lt>sys/stat.hE<gt>>"
5417 #: build/C/man2/stat.2:49
5418 msgid "B<#include E<lt>unistd.hE<gt>>"
5422 #: build/C/man2/stat.2:51
5423 msgid "B<int stat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5427 #: build/C/man2/stat.2:53
5428 msgid "B<int fstat(int >I<fd>B<, struct stat *>I<buf>B<);>"
5432 #: build/C/man2/stat.2:55
5433 msgid "B<int lstat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5437 #: build/C/man2/stat.2:64
5442 #: build/C/man2/stat.2:67
5444 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5445 "_XOPEN_SOURCE_EXTENDED"
5449 #: build/C/man2/stat.2:69
5450 msgid "|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5454 #: build/C/man2/stat.2:83
5456 "These functions return information about a file. No permissions are "
5457 "required on the file itself, but\\(emin the case of B<stat>() and "
5458 "B<lstat>() \\(em execute (search) permission is required on all of the "
5459 "directories in I<path> that lead to the file."
5463 #: build/C/man2/stat.2:89
5464 msgid "B<stat>() stats the file pointed to by I<path> and fills in I<buf>."
5468 #: build/C/man2/stat.2:97
5470 "B<lstat>() is identical to B<stat>(), except that if I<path> is a symbolic "
5471 "link, then the link itself is stat-ed, not the file that it refers to."
5475 #: build/C/man2/stat.2:103
5477 "B<fstat>() is identical to B<stat>(), except that the file to be stat-ed is "
5478 "specified by the file descriptor I<fd>."
5482 #: build/C/man2/stat.2:107
5484 "All of these system calls return a I<stat> structure, which contains the "
5489 #: build/C/man2/stat.2:125
5493 " dev_t st_dev; /* ID of device containing file */\n"
5494 " ino_t st_ino; /* inode number */\n"
5495 " mode_t st_mode; /* protection */\n"
5496 " nlink_t st_nlink; /* number of hard links */\n"
5497 " uid_t st_uid; /* user ID of owner */\n"
5498 " gid_t st_gid; /* group ID of owner */\n"
5499 " dev_t st_rdev; /* device ID (if special file) */\n"
5500 " off_t st_size; /* total size, in bytes */\n"
5501 " blksize_t st_blksize; /* blocksize for file system I/O */\n"
5502 " blkcnt_t st_blocks; /* number of 512B blocks allocated */\n"
5503 " time_t st_atime; /* time of last access */\n"
5504 " time_t st_mtime; /* time of last modification */\n"
5505 " time_t st_ctime; /* time of last status change */\n"
5510 #: build/C/man2/stat.2:136
5512 "The I<st_dev> field describes the device on which this file resides. (The "
5513 "B<major>(3) and B<minor>(3) macros may be useful to decompose the device "
5514 "ID in this field.)"
5518 #: build/C/man2/stat.2:140
5519 msgid "The I<st_rdev> field describes the device that this file (inode) represents."
5523 #: build/C/man2/stat.2:147
5525 "The I<st_size> field gives the size of the file (if it is a regular file or "
5526 "a symbolic link) in bytes. The size of a symbolic link is the length of the "
5527 "pathname it contains, without a terminating null byte."
5531 #: build/C/man2/stat.2:154
5533 "The I<st_blocks> field indicates the number of blocks allocated to the file, "
5534 "512-byte units. (This may be smaller than I<st_size>/512 when the file has "
5539 #: build/C/man2/stat.2:160
5541 "The I<st_blksize> field gives the \"preferred\" blocksize for efficient file "
5542 "system I/O. (Writing to a file in smaller chunks may cause an inefficient "
5543 "read-modify-rewrite.)"
5547 #: build/C/man2/stat.2:181
5549 "Not all of the Linux file systems implement all of the time fields. Some "
5550 "file system types allow mounting in such a way that file and/or directory "
5551 "accesses do not cause an update of the I<st_atime> field. (See I<noatime>, "
5552 "I<nodiratime>, and I<relatime> in B<mount>(8), and related information in "
5553 "B<mount>(2).) In addition, I<st_atime> is not updated if a file is opened "
5554 "with the B<O_NOATIME>; see B<open>(2)."
5558 #: build/C/man2/stat.2:196
5560 "The field I<st_atime> is changed by file accesses, for example, by "
5561 "B<execve>(2), B<mknod>(2), B<pipe>(2), B<utime>(2) and B<read>(2) (of more "
5562 "than zero bytes). Other routines, like B<mmap>(2), may or may not update "
5567 #: build/C/man2/stat.2:215
5569 "The field I<st_mtime> is changed by file modifications, for example, by "
5570 "B<mknod>(2), B<truncate>(2), B<utime>(2) and B<write>(2) (of more than "
5571 "zero bytes). Moreover, I<st_mtime> of a directory is changed by the "
5572 "creation or deletion of files in that directory. The I<st_mtime> field is "
5573 "I<not> changed for changes in owner, group, hard link count, or mode."
5577 #: build/C/man2/stat.2:220
5579 "The field I<st_ctime> is changed by writing or by setting inode information "
5580 "(i.e., owner, group, link count, mode, etc.)."
5584 #: build/C/man2/stat.2:224
5586 "The following POSIX macros are defined to check the file type using the "
5591 #: build/C/man2/stat.2:225
5593 msgid "B<S_ISREG>(m)"
5597 #: build/C/man2/stat.2:228
5598 msgid "is it a regular file?"
5602 #: build/C/man2/stat.2:228
5604 msgid "B<S_ISDIR>(m)"
5608 #: build/C/man2/stat.2:231
5613 #: build/C/man2/stat.2:231
5615 msgid "B<S_ISCHR>(m)"
5619 #: build/C/man2/stat.2:234
5620 msgid "character device?"
5624 #: build/C/man2/stat.2:234
5626 msgid "B<S_ISBLK>(m)"
5630 #: build/C/man2/stat.2:237
5631 msgid "block device?"
5635 #: build/C/man2/stat.2:237
5637 msgid "B<S_ISFIFO>(m)"
5641 #: build/C/man2/stat.2:240
5642 msgid "FIFO (named pipe)?"
5646 #: build/C/man2/stat.2:240
5648 msgid "B<S_ISLNK>(m)"
5652 #: build/C/man2/stat.2:243
5653 msgid "symbolic link? (Not in POSIX.1-1996.)"
5657 #: build/C/man2/stat.2:243
5659 msgid "B<S_ISSOCK>(m)"
5663 #: build/C/man2/stat.2:246
5664 msgid "socket? (Not in POSIX.1-1996.)"
5668 #: build/C/man2/stat.2:251
5669 msgid "The following flags are defined for the I<st_mode> field:"
5673 #: build/C/man2/stat.2:254
5675 msgid "S_IFMT\t0170000\tbit mask for the file type bit fields\n"
5679 #: build/C/man2/stat.2:255
5681 msgid "S_IFSOCK\t0140000\tsocket\n"
5685 #: build/C/man2/stat.2:256
5687 msgid "S_IFLNK\t0120000\tsymbolic link\n"
5691 #: build/C/man2/stat.2:257
5693 msgid "S_IFREG\t0100000\tregular file\n"
5697 #: build/C/man2/stat.2:258
5699 msgid "S_IFBLK\t0060000\tblock device\n"
5703 #: build/C/man2/stat.2:259
5705 msgid "S_IFDIR\t0040000\tdirectory\n"
5709 #: build/C/man2/stat.2:260
5711 msgid "S_IFCHR\t0020000\tcharacter device\n"
5715 #: build/C/man2/stat.2:261
5717 msgid "S_IFIFO\t0010000\tFIFO\n"
5721 #: build/C/man2/stat.2:262
5723 msgid "S_ISUID\t0004000\tset UID bit\n"
5727 #: build/C/man2/stat.2:263
5729 msgid "S_ISGID\t0002000\tset-group-ID bit (see below)\n"
5733 #: build/C/man2/stat.2:264
5735 msgid "S_ISVTX\t0001000\tsticky bit (see below)\n"
5739 #: build/C/man2/stat.2:265
5741 msgid "S_IRWXU\t00700\tmask for file owner permissions\n"
5745 #: build/C/man2/stat.2:266
5747 msgid "S_IRUSR\t00400\towner has read permission\n"
5751 #: build/C/man2/stat.2:267
5753 msgid "S_IWUSR\t00200\towner has write permission\n"
5757 #: build/C/man2/stat.2:268
5759 msgid "S_IXUSR\t00100\towner has execute permission\n"
5763 #: build/C/man2/stat.2:269
5765 msgid "S_IRWXG\t00070\tmask for group permissions\n"
5769 #: build/C/man2/stat.2:270
5771 msgid "S_IRGRP\t00040\tgroup has read permission\n"
5775 #: build/C/man2/stat.2:271
5777 msgid "S_IWGRP\t00020\tgroup has write permission\n"
5781 #: build/C/man2/stat.2:272
5783 msgid "S_IXGRP\t00010\tgroup has execute permission\n"
5787 #: build/C/man2/stat.2:273
5789 msgid "S_IRWXO\t00007\tmask for permissions for others (not in group)\n"
5793 #: build/C/man2/stat.2:274
5795 msgid "S_IROTH\t00004\tothers have read permission\n"
5799 #: build/C/man2/stat.2:275
5801 msgid "S_IWOTH\t00002\tothers have write permission\n"
5805 #: build/C/man2/stat.2:276
5807 msgid "S_IXOTH\t00001\tothers have execute permission\n"
5811 #: build/C/man2/stat.2:293
5813 "The set-group-ID bit (B<S_ISGID>) has several special uses. For a "
5814 "directory it indicates that BSD semantics is to be used for that directory: "
5815 "files created there inherit their group ID from the directory, not from the "
5816 "effective group ID of the creating process, and directories created there "
5817 "will also get the B<S_ISGID> bit set. For a file that does not have the "
5818 "group execution bit (B<S_IXGRP>) set, the set-group-ID bit indicates "
5819 "mandatory file/record locking."
5823 #: build/C/man2/stat.2:300
5825 "The sticky bit (B<S_ISVTX>) on a directory means that a file in that "
5826 "directory can be renamed or deleted only by the owner of the file, by the "
5827 "owner of the directory, and by a privileged process."
5831 #: build/C/man2/stat.2:313
5833 "Search permission is denied for one of the directories in the path prefix of "
5834 "I<path>. (See also B<path_resolution>(7).)"
5838 #: build/C/man2/stat.2:317
5839 msgid "I<fd> is bad."
5843 #: build/C/man2/stat.2:320
5844 msgid "Bad address."
5848 #: build/C/man2/stat.2:323
5849 msgid "Too many symbolic links encountered while traversing the path."
5853 #: build/C/man2/stat.2:327
5854 msgid "I<path> is too long."
5858 #: build/C/man2/stat.2:334
5859 msgid "A component of I<path> does not exist, or I<path> is an empty string."
5863 #: build/C/man2/stat.2:337
5864 msgid "Out of memory (i.e., kernel memory)."
5868 #: build/C/man2/stat.2:342
5869 msgid "A component of the path prefix of I<path> is not a directory."
5873 #: build/C/man2/stat.2:342 build/C/man2/statfs.2:185 build/C/man3/statvfs.3:152
5875 msgid "B<EOVERFLOW>"
5879 #: build/C/man2/stat.2:355
5881 "(B<stat>()) I<path> refers to a file whose size cannot be represented in "
5882 "the type I<off_t>. This can occur when an application compiled on a 32-bit "
5883 "platform without I<-D_FILE_OFFSET_BITS=64> calls B<stat>() on a file whose "
5884 "size exceeds I<(1E<lt>E<lt>31)-1> bits."
5887 #. SVr4 documents additional
5889 #. error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4
5890 #. documents additional
5894 #. error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
5896 #: build/C/man2/stat.2:365
5897 msgid "These system calls conform to SVr4, 4.3BSD, POSIX.1-2001."
5901 #: build/C/man2/stat.2:379
5903 "According to POSIX.1-2001, B<lstat>() on a symbolic link need return valid "
5904 "information only in the I<st_size> field and the file-type component of the "
5905 "I<st_mode> field of the I<stat> structure. POSIX.-2008 tightens the "
5906 "specification, requiring B<lstat>() to return valid information in all "
5907 "fields except the permission bits in I<st_mode>."
5911 #: build/C/man2/stat.2:399
5913 "Use of the I<st_blocks> and I<st_blksize> fields may be less portable. "
5914 "(They were introduced in BSD. The interpretation differs between systems, "
5915 "and possibly on a single system when NFS mounts are involved.) If you need "
5916 "to obtain the definition of the I<blkcnt_t> or I<blksize_t> types from "
5917 "I<E<lt>sys/stat.hE<gt>>, then define B<_XOPEN_SOURCE> with the value 500 or "
5918 "greater (before including I<any> header files)."
5922 #: build/C/man2/stat.2:417
5924 "POSIX.1-1990 did not describe the B<S_IFMT>, B<S_IFSOCK>, B<S_IFLNK>, "
5925 "B<S_IFREG>, B<S_IFBLK>, B<S_IFDIR>, B<S_IFCHR>, B<S_IFIFO>, B<S_ISVTX> "
5926 "constants, but instead demanded the use of the macros B<S_ISDIR>(), etc. "
5927 "The B<S_IF*> constants are present in POSIX.1-2011 and later."
5931 #: build/C/man2/stat.2:425
5933 "The B<S_ISLNK>() and B<S_ISSOCK>() macros are not in POSIX.1-1996, but "
5934 "both are present in POSIX.1-2001; the former is from SVID 4, the latter from "
5939 #: build/C/man2/stat.2:435
5941 "UNIX V7 (and later systems) had B<S_IREAD>, B<S_IWRITE>, B<S_IEXEC>, where "
5942 "POSIX prescribes the synonyms B<S_IRUSR>, B<S_IWUSR>, B<S_IXUSR>."
5946 #: build/C/man2/stat.2:435
5948 msgid "Other Systems"
5952 #: build/C/man2/stat.2:437
5953 msgid "Values that have been (or are) in use on various systems:"
5957 #: build/C/man2/stat.2:440
5959 msgid "hex\tname\tls\toctal\tdescription\n"
5963 #: build/C/man2/stat.2:441
5965 msgid "f000\tS_IFMT\t\t170000\tmask for file type\n"
5969 #: build/C/man2/stat.2:442
5971 msgid "0000\t\t\t000000\tT{\n"
5975 #: build/C/man2/stat.2:443
5977 msgid "SCO out-of-service inode; BSD unknown type; SVID-v2 and XPG2\n"
5981 #: build/C/man2/stat.2:444
5983 msgid "have both 0 and 0100000 for ordinary file\n"
5987 #: build/C/man2/stat.2:445 build/C/man2/stat.2:453 build/C/man2/stat.2:464 build/C/man2/stat.2:476 build/C/man2/stat.2:481 build/C/man2/stat.2:484 build/C/man2/stat.2:488
5993 #: build/C/man2/stat.2:446
5995 msgid "1000\tS_IFIFO\tp|\t010000\tFIFO (named pipe)\n"
5999 #: build/C/man2/stat.2:447
6001 msgid "2000\tS_IFCHR\tc\t020000\tcharacter special (V7)\n"
6005 #: build/C/man2/stat.2:448
6007 msgid "3000\tS_IFMPC\t\t030000\tmultiplexed character special (V7)\n"
6011 #: build/C/man2/stat.2:449
6013 msgid "4000\tS_IFDIR\td/\t040000\tdirectory (V7)\n"
6017 #: build/C/man2/stat.2:450
6019 msgid "5000\tS_IFNAM\t\t050000\tT{\n"
6023 #: build/C/man2/stat.2:451
6025 msgid "XENIX named special file with two subtypes, distinguished by\n"
6029 #: build/C/man2/stat.2:452
6031 msgid "I<st_rdev> values 1, 2\n"
6035 #: build/C/man2/stat.2:454
6037 msgid "0001\tS_INSEM\ts\t000001\tXENIX semaphore subtype of IFNAM\n"
6041 #: build/C/man2/stat.2:455
6043 msgid "0002\tS_INSHD\tm\t000002\tXENIX shared data subtype of IFNAM\n"
6047 #: build/C/man2/stat.2:456
6049 msgid "6000\tS_IFBLK\tb\t060000\tblock special (V7)\n"
6053 #: build/C/man2/stat.2:457
6055 msgid "7000\tS_IFMPB\t\t070000\tmultiplexed block special (V7)\n"
6059 #: build/C/man2/stat.2:458
6061 msgid "8000\tS_IFREG\t-\t100000\tregular (V7)\n"
6065 #: build/C/man2/stat.2:459
6067 msgid "9000\tS_IFCMP\t\t110000\tVxFS compressed\n"
6071 #: build/C/man2/stat.2:460
6073 msgid "9000\tS_IFNWK\tn\t110000\tnetwork special (HP-UX)\n"
6077 #: build/C/man2/stat.2:461
6079 msgid "a000\tS_IFLNK\tl@\t120000\tsymbolic link (BSD)\n"
6083 #: build/C/man2/stat.2:462
6085 msgid "b000\tS_IFSHAD\t\t130000\tT{\n"
6089 #: build/C/man2/stat.2:463
6091 msgid "Solaris shadow inode for ACL (not seen by userspace)\n"
6095 #: build/C/man2/stat.2:465
6097 msgid "c000\tS_IFSOCK\ts=\t140000\tsocket (BSD; also \"S_IFSOC\" on VxFS)\n"
6101 #: build/C/man2/stat.2:466
6103 msgid "d000\tS_IFDOOR\tDE<gt>\t150000\tSolaris door\n"
6107 #: build/C/man2/stat.2:467
6109 msgid "e000\tS_IFWHT\tw%\t160000\tBSD whiteout (not used for inode)\n"
6113 #: build/C/man2/stat.2:468
6115 msgid "0200\tS_ISVTX\t\t001000\tT{\n"
6119 #: build/C/man2/stat.2:469
6121 msgid "sticky bit: save swapped text even after use (V7)\n"
6125 #: build/C/man2/stat.2:470 build/C/man2/stat.2:472 build/C/man2/stat.2:474 build/C/man2/stat.2:479
6131 #: build/C/man2/stat.2:471
6133 msgid "reserved (SVID-v2)\n"
6137 #: build/C/man2/stat.2:473
6139 msgid "On nondirectories: don't cache this file (SunOS)\n"
6143 #: build/C/man2/stat.2:475
6145 msgid "On directories: restricted deletion flag (SVID-v4.2)\n"
6149 #: build/C/man2/stat.2:477
6151 msgid "0400\tS_ISGID\t\t002000\tT{\n"
6155 #: build/C/man2/stat.2:478
6157 msgid "set-group-ID on execution (V7)\n"
6161 #: build/C/man2/stat.2:480
6163 msgid "for directories: use BSD semantics for propagation of GID\n"
6167 #: build/C/man2/stat.2:482
6169 msgid "0400\tS_ENFMT\t\t002000\tT{\n"
6173 #: build/C/man2/stat.2:483
6175 msgid "System V file locking enforcement (shared with S_ISGID)\n"
6179 #: build/C/man2/stat.2:485
6181 msgid "0800\tS_ISUID\t\t004000\tset-user-ID on execution (V7)\n"
6185 #: build/C/man2/stat.2:486
6187 msgid "0800\tS_CDF\t\t004000\tT{\n"
6191 #: build/C/man2/stat.2:487
6193 msgid "directory is a context dependent file (HP-UX)\n"
6197 #: build/C/man2/stat.2:493
6198 msgid "A sticky command appeared in Version 32V AT&T UNIX."
6201 #. As at kernel 2.6.25, XFS and JFS support nanosecond timestamps,
6202 #. but ext2, ext3, and Reiserfs do not.
6204 #: build/C/man2/stat.2:517
6206 "Since kernel 2.5.48, the I<stat> structure supports nanosecond resolution "
6207 "for the three file timestamp fields. Glibc exposes the nanosecond component "
6208 "of each field using names of the form I<st_atim.tv_nsec> if the "
6209 "B<_BSD_SOURCE> or B<_SVID_SOURCE> feature test macro is defined. These "
6210 "fields are specified in POSIX.1-2008, and, starting with version 2.12, glibc "
6211 "also exposes these field names if B<_POSIX_C_SOURCE> is defined with the "
6212 "value 200809L or greater, or B<_XOPEN_SOURCE> is defined with the value 700 "
6213 "or greater. If none of the aforementioned macros are defined, then the "
6214 "nanosecond values are exposed with names of the form I<st_atimensec>. On "
6215 "file systems that do not support subsecond timestamps, the nanosecond fields "
6216 "are returned with the value 0."
6220 #: build/C/man2/stat.2:524
6222 "On Linux, B<lstat>() will generally not trigger automounter action, whereas "
6223 "B<stat>() will (but see B<fstatat>(2))."
6227 #: build/C/man2/stat.2:532
6229 "For most files under the I</proc> directory, B<stat>() does not return the "
6230 "file size in the I<st_size> field; instead the field is returned with the "
6235 #: build/C/man2/stat.2:532
6237 msgid "Underlying kernel interface"
6241 #. A note from Andries Brouwer, July 2007
6243 #. > Is the story not rather more complicated for some calls like
6246 #. Yes and no, mostly no. See /usr/include/sys/stat.h .
6248 #. The idea is here not so much that syscalls change, but that
6249 #. the definitions of struct stat and of the types dev_t and mode_t change.
6250 #. This means that libc (even if it does not call the kernel
6251 #. but only calls some internal function) must know what the
6252 #. format of dev_t or of struct stat is.
6253 #. The communication between the application and libc goes via
6254 #. the include file <sys/stat.h> that defines a _STAT_VER and
6255 #. _MKNOD_VER describing the layout of the data that user space
6256 #. uses. Each (almost each) occurrence of stat() is replaced by
6257 #. an occurrence of xstat() where the first parameter of xstat()
6258 #. is this version number _STAT_VER.
6260 #. Now, also the definitions used by the kernel change.
6261 #. But glibc copes with this in the standard way, and the
6262 #. struct stat as returned by the kernel is repacked into
6263 #. the struct stat as expected by the application.
6264 #. Thus, _STAT_VER and this setup cater for the application-libc
6265 #. interface, rather than the libc-kernel interface.
6267 #. (Note that the details depend on gcc being used as c compiler.)
6269 #: build/C/man2/stat.2:584
6271 "Over time, increases in the size of the I<stat> structure have led to three "
6272 "successive versions of B<stat>(): I<sys_stat>() (slot I<__NR_oldstat>), "
6273 "I<sys_newstat>() (slot I<__NR_stat>), and I<sys_stat64()> (new in kernel "
6274 "2.4; slot I<__NR_stat64>). The glibc B<stat>() wrapper function hides "
6275 "these details from applications, invoking the most recent version of the "
6276 "system call provided by the kernel, and repacking the returned information "
6277 "if required for old binaries. Similar remarks apply for B<fstat>() and "
6282 #: build/C/man2/stat.2:590
6284 "The following program calls B<stat>() and displays selected fields in the "
6285 "returned I<stat> structure."
6289 #: build/C/man2/stat.2:597
6292 "#include E<lt>sys/types.hE<gt>\n"
6293 "#include E<lt>sys/stat.hE<gt>\n"
6294 "#include E<lt>time.hE<gt>\n"
6295 "#include E<lt>stdio.hE<gt>\n"
6296 "#include E<lt>stdlib.hE<gt>\n"
6300 #: build/C/man2/stat.2:602
6304 "main(int argc, char *argv[])\n"
6306 " struct stat sb;\n"
6310 #: build/C/man2/stat.2:607
6313 " if (argc != 2) {\n"
6314 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
6315 " exit(EXIT_FAILURE);\n"
6320 #: build/C/man2/stat.2:612
6323 " if (stat(argv[1], &sb) == -1) {\n"
6324 " perror(\"stat\");\n"
6325 " exit(EXIT_FAILURE);\n"
6330 #: build/C/man2/stat.2:614
6332 msgid " printf(\"File type: \");\n"
6336 #: build/C/man2/stat.2:625
6339 " switch (sb.st_mode & S_IFMT) {\n"
6340 " case S_IFBLK: printf(\"block device\\en\"); break;\n"
6341 " case S_IFCHR: printf(\"character device\\en\"); break;\n"
6342 " case S_IFDIR: printf(\"directory\\en\"); break;\n"
6343 " case S_IFIFO: printf(\"FIFO/pipe\\en\"); break;\n"
6344 " case S_IFLNK: printf(\"symlink\\en\"); break;\n"
6345 " case S_IFREG: printf(\"regular file\\en\"); break;\n"
6346 " case S_IFSOCK: printf(\"socket\\en\"); break;\n"
6347 " default: printf(\"unknown?\\en\"); break;\n"
6352 #: build/C/man2/stat.2:627
6354 msgid " printf(\"I-node number: %ld\\en\", (long) sb.st_ino);\n"
6358 #: build/C/man2/stat.2:630
6361 " printf(\"Mode: %lo (octal)\\en\",\n"
6362 " (unsigned long) sb.st_mode);\n"
6366 #: build/C/man2/stat.2:634
6369 " printf(\"Link count: %ld\\en\", (long) sb.st_nlink);\n"
6370 " printf(\"Ownership: UID=%ld GID=%ld\\en\",\n"
6371 " (long) sb.st_uid, (long) sb.st_gid);\n"
6375 #: build/C/man2/stat.2:641
6378 " printf(\"Preferred I/O block size: %ld bytes\\en\",\n"
6379 " (long) sb.st_blksize);\n"
6380 " printf(\"File size: %lld bytes\\en\",\n"
6381 " (long long) sb.st_size);\n"
6382 " printf(\"Blocks allocated: %lld\\en\",\n"
6383 " (long long) sb.st_blocks);\n"
6387 #: build/C/man2/stat.2:645
6390 " printf(\"Last status change: %s\", ctime(&sb.st_ctime));\n"
6391 " printf(\"Last file access: %s\", ctime(&sb.st_atime));\n"
6392 " printf(\"Last file modification: %s\", ctime(&sb.st_mtime));\n"
6396 #: build/C/man2/stat.2:658
6398 "B<access>(2), B<chmod>(2), B<chown>(2), B<fstatat>(2), B<readlink>(2), "
6399 "B<utime>(2), B<capabilities>(7), B<symlink>(7)"
6403 #: build/C/man2/statfs.2:26
6409 #: build/C/man2/statfs.2:26
6415 #: build/C/man2/statfs.2:29
6416 msgid "statfs, fstatfs - get file system statistics"
6420 #: build/C/man2/statfs.2:31
6421 msgid "B<#include E<lt>sys/vfs.hE<gt> >/* or E<lt>sys/statfs.hE<gt> */"
6425 #: build/C/man2/statfs.2:33
6426 msgid "B<int statfs(const char *>I<path>B<, struct statfs *>I<buf>B<);>"
6430 #: build/C/man2/statfs.2:35
6431 msgid "B<int fstatfs(int >I<fd>B<, struct statfs *>I<buf>B<);>"
6435 #: build/C/man2/statfs.2:45
6437 "The function B<statfs>() returns information about a mounted file system. "
6438 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6439 "is a pointer to a I<statfs> structure defined approximately as follows:"
6443 #: build/C/man2/statfs.2:53
6446 "#if __WORDSIZE == 32\t\t/* System word size */\n"
6447 "# define __SWORD_TYPE int\n"
6448 "#else /* __WORDSIZE == 64 */\n"
6449 "# define __SWORD_TYPE\t\tlong int\n"
6454 #: build/C/man2/statfs.2:68
6458 " __SWORD_TYPE f_type; /* type of file system (see below) */\n"
6459 " __SWORD_TYPE f_bsize; /* optimal transfer block size */\n"
6460 " fsblkcnt_t f_blocks; /* total data blocks in file system */\n"
6461 " fsblkcnt_t f_bfree; /* free blocks in fs */\n"
6462 " fsblkcnt_t f_bavail; /* free blocks available to\n"
6463 " unprivileged user */\n"
6464 " fsfilcnt_t f_files; /* total file nodes in file system */\n"
6465 " fsfilcnt_t f_ffree; /* free file nodes in fs */\n"
6466 " fsid_t f_fsid; /* file system id */\n"
6467 " __SWORD_TYPE f_namelen; /* maximum length of filenames */\n"
6468 " __SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */\n"
6469 " __SWORD_TYPE f_spare[5];\n"
6474 #: build/C/man2/statfs.2:70
6476 msgid "File system types:\n"
6480 #: build/C/man2/statfs.2:116
6483 " ADFS_SUPER_MAGIC 0xadf5\n"
6484 " AFFS_SUPER_MAGIC 0xADFF\n"
6485 " BEFS_SUPER_MAGIC 0x42465331\n"
6486 " BFS_MAGIC 0x1BADFACE\n"
6487 " CIFS_MAGIC_NUMBER 0xFF534D42\n"
6488 " CODA_SUPER_MAGIC 0x73757245\n"
6489 " COH_SUPER_MAGIC 0x012FF7B7\n"
6490 " CRAMFS_MAGIC 0x28cd3d45\n"
6491 " DEVFS_SUPER_MAGIC 0x1373\n"
6492 " EFS_SUPER_MAGIC 0x00414A53\n"
6493 " EXT_SUPER_MAGIC 0x137D\n"
6494 " EXT2_OLD_SUPER_MAGIC 0xEF51\n"
6495 " EXT2_SUPER_MAGIC 0xEF53\n"
6496 " EXT3_SUPER_MAGIC 0xEF53\n"
6497 " EXT4_SUPER_MAGIC 0xEF53\n"
6498 " HFS_SUPER_MAGIC 0x4244\n"
6499 " HPFS_SUPER_MAGIC 0xF995E849\n"
6500 " HUGETLBFS_MAGIC 0x958458f6\n"
6501 " ISOFS_SUPER_MAGIC 0x9660\n"
6502 " JFFS2_SUPER_MAGIC 0x72b6\n"
6503 " JFS_SUPER_MAGIC 0x3153464a\n"
6504 " MINIX_SUPER_MAGIC 0x137F /* orig. minix */\n"
6505 " MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */\n"
6506 " MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */\n"
6507 " MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */\n"
6508 " MSDOS_SUPER_MAGIC 0x4d44\n"
6509 " NCP_SUPER_MAGIC 0x564c\n"
6510 " NFS_SUPER_MAGIC 0x6969\n"
6511 " NTFS_SB_MAGIC 0x5346544e\n"
6512 " OPENPROM_SUPER_MAGIC 0x9fa1\n"
6513 " PROC_SUPER_MAGIC 0x9fa0\n"
6514 " QNX4_SUPER_MAGIC 0x002f\n"
6515 " REISERFS_SUPER_MAGIC 0x52654973\n"
6516 " ROMFS_MAGIC 0x7275\n"
6517 " SMB_SUPER_MAGIC 0x517B\n"
6518 " SYSV2_SUPER_MAGIC 0x012FF7B6\n"
6519 " SYSV4_SUPER_MAGIC 0x012FF7B5\n"
6520 " TMPFS_MAGIC 0x01021994\n"
6521 " UDF_SUPER_MAGIC 0x15013346\n"
6522 " UFS_MAGIC 0x00011954\n"
6523 " USBDEVICE_SUPER_MAGIC 0x9fa2\n"
6524 " VXFS_SUPER_MAGIC 0xa501FCF5\n"
6525 " XENIX_SUPER_MAGIC 0x012FF7B4\n"
6526 " XFS_SUPER_MAGIC 0x58465342\n"
6527 " _XIAFS_SUPER_MAGIC 0x012FD16D\n"
6531 #: build/C/man2/statfs.2:122
6532 msgid "Nobody knows what I<f_fsid> is supposed to contain (but see below)."
6536 #: build/C/man2/statfs.2:127
6538 "Fields that are undefined for a particular file system are set to 0. "
6539 "B<fstatfs>() returns the same information about an open file referenced by "
6544 #: build/C/man2/statfs.2:140
6546 "(B<statfs>()) Search permission is denied for a component of the path "
6547 "prefix of I<path>. (See also B<path_resolution>(7).)"
6551 #: build/C/man2/statfs.2:145
6552 msgid "(B<fstatfs>()) I<fd> is not a valid open file descriptor."
6556 #: build/C/man2/statfs.2:151
6557 msgid "I<buf> or I<path> points to an invalid address."
6561 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6562 msgid "This call was interrupted by a signal."
6566 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6572 #: build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
6573 msgid "An I/O error occurred while reading from the file system."
6577 #: build/C/man2/statfs.2:162
6579 "(B<statfs>()) Too many symbolic links were encountered in translating "
6584 #: build/C/man2/statfs.2:167
6585 msgid "(B<statfs>()) I<path> is too long."
6589 #: build/C/man2/statfs.2:173
6590 msgid "(B<statfs>()) The file referred to by I<path> does not exist."
6594 #: build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143
6595 msgid "Insufficient kernel memory was available."
6599 #: build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
6600 msgid "The file system does not support this call."
6604 #: build/C/man2/statfs.2:185
6605 msgid "(B<statfs>()) A component of the path prefix of I<path> is not a directory."
6609 #: build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155
6610 msgid "Some values were too large to be represented in the returned struct."
6614 #: build/C/man2/statfs.2:194
6616 "Linux-specific. The Linux B<statfs>() was inspired by the 4.4BSD one (but "
6617 "they do not use the same structure)."
6621 #: build/C/man2/statfs.2:216
6623 "The original Linux B<statfs>() and B<fstatfs>() system calls were not "
6624 "designed with extremely large file sizes in mind. Subsequently, Linux 2.6 "
6625 "added new B<statfs64>() and B<fstatfs64>() system calls that employ a new "
6626 "structure, I<statfs64>. The new structure contains the same fields as the "
6627 "original I<statfs> structure, but the sizes of various fields are increased, "
6628 "to accommodate large file sizes. The glibc B<statfs>() and B<fstatfs>() "
6629 "wrapper functions transparently deal with the kernel differences."
6633 #: build/C/man2/statfs.2:221
6635 "Some systems only have I<E<lt>sys/vfs.hE<gt>>, other systems also have "
6636 "I<E<lt>sys/statfs.hE<gt>>, where the former includes the latter. So it "
6637 "seems including the former is the best choice."
6641 #: build/C/man2/statfs.2:231
6643 "LSB has deprecated the library calls B<statfs>() and B<fstatfs>() and "
6644 "tells us to use B<statvfs>(2) and B<fstatvfs>(2) instead."
6648 #: build/C/man2/statfs.2:231
6650 msgid "The f_fsid field"
6654 #: build/C/man2/statfs.2:256
6656 "Solaris, Irix and POSIX have a system call B<statvfs>(2) that returns a "
6657 "I<struct statvfs> (defined in I<E<lt>sys/statvfs.hE<gt>>) containing an "
6658 "I<unsigned long> I<f_fsid>. Linux, SunOS, HP-UX, 4.4BSD have a system call "
6659 "B<statfs>() that returns a I<struct statfs> (defined in "
6660 "I<E<lt>sys/vfs.hE<gt>>) containing a I<fsid_t> I<f_fsid>, where I<fsid_t> "
6661 "is defined as I<struct { int val[2]; }>. The same holds for FreeBSD, except "
6662 "that it uses the include file I<E<lt>sys/mount.hE<gt>>."
6666 #: build/C/man2/statfs.2:269
6668 "The general idea is that I<f_fsid> contains some random stuff such that the "
6669 "pair (I<f_fsid>,I<ino>) uniquely determines a file. Some operating systems "
6670 "use (a variation on) the device number, or the device number combined with "
6671 "the file-system type. Several OSes restrict giving out the I<f_fsid> field "
6672 "to the superuser only (and zero it for unprivileged users), because this "
6673 "field is used in the filehandle of the file system when NFS-exported, and "
6674 "giving it out is a security concern."
6678 #: build/C/man2/statfs.2:275
6680 "Under some operating systems the I<fsid> can be used as second argument to "
6681 "the B<sysfs>(2) system call."
6685 #: build/C/man2/statfs.2:279
6686 msgid "B<stat>(2), B<statvfs>(2), B<path_resolution>(7)"
6690 #: build/C/man3/statvfs.3:28
6696 #: build/C/man3/statvfs.3:28
6702 #: build/C/man3/statvfs.3:31
6703 msgid "statvfs, fstatvfs - get file system statistics"
6707 #: build/C/man3/statvfs.3:33
6708 msgid "B<#include E<lt>sys/statvfs.hE<gt>>"
6712 #: build/C/man3/statvfs.3:35
6713 msgid "B<int statvfs(const char *>I<path>B<, struct statvfs *>I<buf>B<);>"
6717 #: build/C/man3/statvfs.3:37
6718 msgid "B<int fstatvfs(int >I<fd>B<, struct statvfs *>I<buf>B<);>"
6722 #: build/C/man3/statvfs.3:47
6724 "The function B<statvfs>() returns information about a mounted file system. "
6725 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6726 "is a pointer to a I<statvfs> structure defined approximately as follows:"
6730 #: build/C/man3/statvfs.3:63
6733 "struct statvfs {\n"
6734 " unsigned long f_bsize; /* file system block size */\n"
6735 " unsigned long f_frsize; /* fragment size */\n"
6736 " fsblkcnt_t f_blocks; /* size of fs in f_frsize units */\n"
6737 " fsblkcnt_t f_bfree; /* # free blocks */\n"
6738 " fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */\n"
6739 " fsfilcnt_t f_files; /* # inodes */\n"
6740 " fsfilcnt_t f_ffree; /* # free inodes */\n"
6741 " fsfilcnt_t f_favail; /* # free inodes for unprivileged users */\n"
6742 " unsigned long f_fsid; /* file system ID */\n"
6743 " unsigned long f_flag; /* mount flags */\n"
6744 " unsigned long f_namemax; /* maximum filename length */\n"
6749 #: build/C/man3/statvfs.3:74
6751 "Here the types I<fsblkcnt_t> and I<fsfilcnt_t> are defined in "
6752 "I<E<lt>sys/types.hE<gt>>. Both used to be I<unsigned long>."
6756 #: build/C/man3/statvfs.3:80
6758 "The field I<f_flag> is a bit mask (of mount flags, see B<mount>(8)). Bits "
6759 "defined by POSIX are"
6763 #: build/C/man3/statvfs.3:80
6765 msgid "B<ST_RDONLY>"
6769 #: build/C/man3/statvfs.3:83
6770 msgid "Read-only file system."
6774 #: build/C/man3/statvfs.3:83
6776 msgid "B<ST_NOSUID>"
6780 #: build/C/man3/statvfs.3:87
6781 msgid "Set-user-ID/set-group-ID bits are ignored by B<exec>(3)."
6785 #: build/C/man3/statvfs.3:90
6787 "It is unspecified whether all members of the returned struct have meaningful "
6788 "values on all file systems."
6792 #: build/C/man3/statvfs.3:94
6794 "B<fstatvfs>() returns the same information about an open file referenced by "
6799 #: build/C/man3/statvfs.3:107
6801 "(B<statvfs>()) Search permission is denied for a component of the path "
6802 "prefix of I<path>. (See also B<path_resolution>(7).)"
6806 #: build/C/man3/statvfs.3:112
6807 msgid "(B<fstatvfs>()) I<fd> is not a valid open file descriptor."
6811 #: build/C/man3/statvfs.3:118
6812 msgid "I<Buf> or I<path> points to an invalid address."
6816 #: build/C/man3/statvfs.3:129
6818 "(B<statvfs>()) Too many symbolic links were encountered in translating "
6823 #: build/C/man3/statvfs.3:134
6824 msgid "(B<statvfs>()) I<path> is too long."
6828 #: build/C/man3/statvfs.3:140
6829 msgid "(B<statvfs>()) The file referred to by I<path> does not exist."
6833 #: build/C/man3/statvfs.3:152
6835 "(B<statvfs>()) A component of the path prefix of I<path> is not a "
6840 #: build/C/man3/statvfs.3:157
6841 msgid "POSIX.1-2001."
6845 #: build/C/man3/statvfs.3:163
6847 "The Linux kernel has system calls B<statfs>(2) and B<fstatfs>(2) to "
6848 "support this library call."
6852 #: build/C/man3/statvfs.3:165
6853 msgid "The current glibc implementations of"
6857 #: build/C/man3/statvfs.3:170
6860 " pathconf(path, _PC_REC_XFER_ALIGN);\n"
6861 " pathconf(path, _PC_ALLOC_SIZE_MIN);\n"
6862 " pathconf(path, _PC_REC_MIN_XFER_SIZE);\n"
6866 #: build/C/man3/statvfs.3:179
6868 "respectively use the I<f_frsize>, I<f_frsize>, and I<f_bsize> fields of the "
6869 "return value of I<statvfs(path,buf)>."
6873 #: build/C/man3/statvfs.3:181
6874 msgid "B<statfs>(2)"
6878 #: build/C/man2/sysfs.2:25
6884 #: build/C/man2/sysfs.2:25
6890 #: build/C/man2/sysfs.2:28
6891 msgid "sysfs - get file system type information"
6895 #: build/C/man2/sysfs.2:30
6896 msgid "B<int sysfs(int >I<option>B<, const char *>I<fsname>B<);>"
6900 #: build/C/man2/sysfs.2:32
6902 "B<int sysfs(int >I<option>B<, unsigned int >I<fs_index>B<, char "
6907 #: build/C/man2/sysfs.2:34
6908 msgid "B<int sysfs(int >I<option>B<);>"
6912 #: build/C/man2/sysfs.2:43
6914 "B<sysfs>() returns information about the file system types currently "
6915 "present in the kernel. The specific form of the B<sysfs>() call and the "
6916 "information returned depends on the I<option> in effect:"
6920 #: build/C/man2/sysfs.2:43
6926 #: build/C/man2/sysfs.2:48
6928 "Translate the file-system identifier string I<fsname> into a file-system "
6933 #: build/C/man2/sysfs.2:48
6939 #: build/C/man2/sysfs.2:59
6941 "Translate the file-system type index I<fs_index> into a null-terminated "
6942 "file-system identifier string. This string will be written to the buffer "
6943 "pointed to by I<buf>. Make sure that I<buf> has enough space to accept the "
6948 #: build/C/man2/sysfs.2:59
6954 #: build/C/man2/sysfs.2:63
6956 "Return the total number of file system types currently present in the "
6961 #: build/C/man2/sysfs.2:65
6962 msgid "The numbering of the file-system type indexes begins with zero."
6966 #: build/C/man2/sysfs.2:77
6968 "On success, B<sysfs>() returns the file-system index for option B<1>, zero "
6969 "for option B<2>, and the number of currently configured file systems for "
6970 "option B<3>. On error, -1 is returned, and I<errno> is set appropriately."
6974 #: build/C/man2/sysfs.2:82
6975 msgid "Either I<fsname> or I<buf> is outside your accessible address space."
6979 #: build/C/man2/sysfs.2:90
6981 "I<fsname> is not a valid file-system type identifier; I<fs_index> is "
6982 "out-of-bounds; I<option> is invalid."
6985 #. SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
6986 #. but has no ENOSYS condition.
6988 #: build/C/man2/sysfs.2:92 build/C/man2/ustat.2:94
6993 #: build/C/man2/sysfs.2:99
6995 "This System-V derived system call is obsolete; don't use it. On systems "
6996 "with I</proc>, the same information can be obtained via "
6997 "I</proc/filesystems>; use that interface instead."
7001 #: build/C/man2/sysfs.2:99
7007 #: build/C/man2/sysfs.2:102
7009 "There is no libc or glibc support. There is no way to guess how large "
7014 #: build/C/man2/umount.2:30
7020 #: build/C/man2/umount.2:30
7026 #: build/C/man2/umount.2:33
7027 msgid "umount, umount2 - unmount file system"
7031 #: build/C/man2/umount.2:38
7033 msgid "B<int umount(const char *>I<target>B<);>\n"
7037 #: build/C/man2/umount.2:40
7039 msgid "B<int umount2(const char *>I<target>B<, int >I<flags>B<);>\n"
7042 #. Note: the kernel naming differs from the glibc naming
7043 #. umount2 is the glibc name for what the kernel now calls umount
7044 #. and umount is the glibc name for oldumount
7046 #: build/C/man2/umount.2:50
7048 "B<umount>() and B<umount2>() remove the attachment of the (topmost) file "
7049 "system mounted on I<target>."
7053 #: build/C/man2/umount.2:54
7055 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
7056 "to unmount file systems."
7060 #: build/C/man2/umount.2:62
7062 "Linux 2.1.116 added the B<umount2>() system call, which, like B<umount>(), "
7063 "unmounts a target, but allows additional I<flags> controlling the behavior "
7068 #: build/C/man2/umount.2:62
7070 msgid "B<MNT_FORCE> (since Linux 2.1.116)"
7074 #: build/C/man2/umount.2:67
7076 "Force unmount even if busy. This can cause data loss. (Only for NFS "
7081 #: build/C/man2/umount.2:67
7083 msgid "B<MNT_DETACH> (since Linux 2.4.11)"
7087 #: build/C/man2/umount.2:72
7089 "Perform a lazy unmount: make the mount point unavailable for new accesses, "
7090 "and actually perform the unmount when the mount point ceases to be busy."
7094 #: build/C/man2/umount.2:72
7096 msgid "B<MNT_EXPIRE> (since Linux 2.6.8)"
7100 #: build/C/man2/umount.2:91
7102 "Mark the mount point as expired. If a mount point is not currently in use, "
7103 "then an initial call to B<umount2>() with this flag fails with the error "
7104 "B<EAGAIN>, but marks the mount point as expired. The mount point remains "
7105 "expired as long as it isn't accessed by any process. A second B<umount2>() "
7106 "call specifying B<MNT_EXPIRE> unmounts an expired mount point. This flag "
7107 "cannot be specified with either B<MNT_FORCE> or B<MNT_DETACH>."
7111 #: build/C/man2/umount.2:91
7113 msgid "B<UMOUNT_NOFOLLOW> (since Linux 2.6.34)"
7116 #. Later added to 2.6.33-stable
7118 #: build/C/man2/umount.2:99
7120 "Don't dereference I<target> if it is a symbolic link. This flag allows "
7121 "security problems to be avoided in set-user-ID-I<root> programs that allow "
7122 "unprivileged users to unmount file systems."
7126 #: build/C/man2/umount.2:110
7128 "The error values given below result from file-system type independent "
7129 "errors. Each file system type may have its own special errors and its own "
7130 "special behavior. See the kernel source code for details."
7134 #: build/C/man2/umount.2:110
7140 #: build/C/man2/umount.2:117
7142 "A call to B<umount2>() specifying B<MNT_EXPIRE> successfully marked an "
7143 "unbusy file system as expired."
7147 #: build/C/man2/umount.2:121
7148 msgid "I<target> could not be unmounted because it is busy."
7152 #: build/C/man2/umount.2:125
7153 msgid "I<target> points outside the user address space."
7157 #: build/C/man2/umount.2:137
7159 "I<target> is not a mount point. Or, B<umount2>() was called with "
7160 "B<MNT_EXPIRE> and either B<MNT_DETACH> or B<MNT_FORCE>."
7163 #. http://sourceware.org/bugzilla/show_bug.cgi?id=10092
7165 #: build/C/man2/umount.2:156
7167 "B<MNT_DETACH> and B<MNT_EXPIRE> are only available in glibc since version "
7172 #: build/C/man2/umount.2:159
7174 "These functions are Linux-specific and should not be used in programs "
7175 "intended to be portable."
7179 #: build/C/man2/umount.2:170
7181 "The original B<umount>() function was called as I<umount(device)> and would "
7182 "return B<ENOTBLK> when called with something other than a block device. In "
7183 "Linux 0.98p4 a call I<umount(dir)> was added, in order to support anonymous "
7184 "devices. In Linux 2.3.99-pre7 the call I<umount(device)> was removed, "
7185 "leaving only I<umount(dir)> (since now devices can be mounted in more than "
7186 "one place, so specifying the device does not suffice)."
7190 #: build/C/man2/umount.2:175
7191 msgid "B<mount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
7195 #: build/C/man2/ustat.2:28
7201 #: build/C/man2/ustat.2:28
7207 #: build/C/man2/ustat.2:31
7208 msgid "ustat - get file system statistics"
7212 #: build/C/man2/ustat.2:34
7214 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
7218 #: build/C/man2/ustat.2:36
7220 msgid "B<#include E<lt>unistd.hE<gt>> /* libc[45] */\n"
7224 #: build/C/man2/ustat.2:38
7226 msgid "B<#include E<lt>ustat.hE<gt>> /* glibc2 */\n"
7230 #: build/C/man2/ustat.2:40
7232 msgid "B<int ustat(dev_t >I<dev>B<, struct ustat *>I<ubuf>B<);>\n"
7236 #: build/C/man2/ustat.2:50
7238 "B<ustat>() returns information about a mounted file system. I<dev> is a "
7239 "device number identifying a device containing a mounted file system. "
7240 "I<ubuf> is a pointer to a I<ustat> structure that contains the following "
7245 #: build/C/man2/ustat.2:57
7248 "daddr_t f_tfree; /* Total free blocks */\n"
7249 "ino_t f_tinode; /* Number of free inodes */\n"
7250 "char f_fname[6]; /* Filsys name */\n"
7251 "char f_fpack[6]; /* Filsys pack name */\n"
7255 #: build/C/man2/ustat.2:66
7257 "The last two fields, I<f_fname> and I<f_fpack>, are not implemented and will "
7258 "always be filled with null bytes (\\(aq\\e0\\(aq)."
7262 #: build/C/man2/ustat.2:75
7264 "On success, zero is returned and the I<ustat> structure pointed to by "
7265 "I<ubuf> will be filled in. On error, -1 is returned, and I<errno> is set "
7270 #: build/C/man2/ustat.2:80
7271 msgid "I<ubuf> points outside of your accessible address space."
7275 #: build/C/man2/ustat.2:84
7276 msgid "I<dev> does not refer to a device containing a mounted file system."
7280 #: build/C/man2/ustat.2:90
7282 "The mounted file system referenced by I<dev> does not support this "
7283 "operation, or any version of Linux before 1.3.16."
7287 #: build/C/man2/ustat.2:100
7289 "B<ustat>() is deprecated and has only been provided for compatibility. All "
7290 "new programs should use B<statfs>(2) instead."
7294 #: build/C/man2/ustat.2:100
7299 #. Some software tries to use this in order to test whether the
7300 #. underlying file system is NFS.
7302 #: build/C/man2/ustat.2:114
7304 "The HP-UX version of the I<ustat> structure has an additional field, "
7305 "I<f_blksize>, that is unknown elsewhere. HP-UX warns: For some file "
7306 "systems, the number of free inodes does not change. Such file systems will "
7307 "return -1 in the field I<f_tinode>. For some file systems, inodes are "
7308 "dynamically allocated. Such file systems will return the current number of "
7313 #: build/C/man2/ustat.2:117
7314 msgid "B<stat>(2), B<statfs>(2)"