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-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
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:454 build/C/man7/path_resolution.7:229 build/C/man2/removexattr.2:110 build/C/man2/setxattr.2:153 build/C/man2/spu_create.2:265 build/C/man2/spu_run.2:259 build/C/man7/spufs.7:765 build/C/man2/stat.2:638 build/C/man2/statfs.2:275 build/C/man3/statvfs.3:179 build/C/man2/umount.2:170 build/C/man2/ustat.2:114
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:459 build/C/man7/path_resolution.7:234 build/C/man2/removexattr.2:120 build/C/man2/setxattr.2:163 build/C/man2/spu_create.2:270 build/C/man2/spu_run.2:264 build/C/man7/spufs.7:771 build/C/man2/stat.2:647 build/C/man2/statfs.2:279 build/C/man3/statvfs.3:181 build/C/man2/sysfs.2:102 build/C/man2/umount.2:175 build/C/man2/ustat.2:117
416 #: build/C/man5/filesystems.5:202 build/C/man3/fts.3:794 build/C/man3/ftw.3:415 build/C/man3/getfsent.3:141 build/C/man3/getmntent.3:204 build/C/man2/getxattr.2:160 build/C/man2/listxattr.2:172 build/C/man2/mount.2:466 build/C/man7/path_resolution.7:241 build/C/man2/removexattr.2:127 build/C/man2/setxattr.2:170 build/C/man2/spu_create.2:277 build/C/man2/spu_run.2:271 build/C/man7/spufs.7:778 build/C/man2/stat.2:654 build/C/man2/statfs.2:286 build/C/man3/statvfs.3:188 build/C/man2/sysfs.2:109 build/C/man2/umount.2:182 build/C/man2/ustat.2:124
418 "This page is part of release 3.40 of the Linux I<man-pages> project. A "
419 "description of the project, and information about reporting bugs, can be "
420 "found at http://www.kernel.org/doc/man-pages/."
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:284 build/C/man2/spu_create.2:168 build/C/man2/spu_run.2:149 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/sysfs.2:77 build/C/man2/umount.2:104 build/C/man2/ustat.2:75
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:320 build/C/man2/spu_create.2:182 build/C/man2/spu_run.2:170 build/C/man2/sysfs.2:82 build/C/man2/umount.2:125 build/C/man2/ustat.2:80
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:378 build/C/man2/removexattr.2:99 build/C/man2/setxattr.2:142 build/C/man2/spu_create.2:242 build/C/man2/spu_run.2:184 build/C/man2/umount.2:150
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:389 build/C/man2/removexattr.2:102 build/C/man2/setxattr.2:145 build/C/man2/spu_create.2:246 build/C/man2/spu_run.2:188 build/C/man2/stat.2:355 build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155 build/C/man2/sysfs.2:90 build/C/man2/umount.2:156 build/C/man2/ustat.2:90
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:279 build/C/man2/removexattr.2:80 build/C/man2/setxattr.2:107 build/C/man2/spu_create.2:161 build/C/man2/spu_run.2:98 build/C/man2/stat.2:300 build/C/man2/statfs.2:127 build/C/man3/statvfs.3:94 build/C/man2/sysfs.2:65 build/C/man2/umount.2:99 build/C/man2/ustat.2:66
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:392 build/C/man2/spu_create.2:250 build/C/man2/spu_run.2:192 build/C/man2/stat.2:482 build/C/man2/statfs.2:194 build/C/man3/statvfs.3:157 build/C/man2/sysfs.2:92 build/C/man2/umount.2:159 build/C/man2/ustat.2:94
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:573
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> (like \"minix\", \"ext2\", \"ext3\", \"jfs\", "
2626 "\"xfs\", \"reiserfs\", \"msdos\", \"proc\", \"nfs\", \"iso9660\" etc.). "
2627 "Further types may become available when the appropriate modules are loaded."
2630 #. FIXME 2.6.15 added flags for "shared subtree" functionality:
2631 #. MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
2632 #. These need to be documented on this page.
2634 #. Documentation/filesystems/sharedsubtree.txt
2636 #. http://lwn.net/Articles/159077/
2638 #. http://myweb.sudhaa.com:2022/~ram/sharedsubtree/paper/sharedsubtree.1.pdf
2639 #. Shared-Subtree Concept, Implementation, and Applications in Linux
2640 #. Al Viro viro@ftp.linux.org.uk
2641 #. Ram Pai linuxram@us.ibm.com
2643 #. http://foss.in/2005/slides/sharedsubtree1.pdf
2644 #. Shared Subtree Concept and Implementation in the Linux Kernel
2647 #. 2.6.25 Added MS_I_VERSION, which needs to be documented.
2649 #: build/C/man2/mount.2:103
2651 "The I<mountflags> argument may have the magic number 0xC0ED (B<MS_MGC_VAL>) "
2652 "in the top 16 bits (this was required in kernel versions prior to 2.4, but "
2653 "is no longer required and ignored if specified), and various mount flags (as "
2654 "defined in I<E<lt>linux/fs.hE<gt>> for libc4 and libc5 and in "
2655 "I<E<lt>sys/mount.hE<gt>> for glibc2) in the low order 16 bits:"
2659 #: build/C/man2/mount.2:103
2661 msgid "B<MS_BIND> (Linux 2.4 onward)"
2664 #. since 2.4.0-test9
2665 #. with the exception of the "hidden" MS_REC mountflags bit
2667 #: build/C/man2/mount.2:122
2669 "Perform a bind mount, making a file or a directory subtree visible at "
2670 "another point within a file system. Bind mounts may cross file system "
2671 "boundaries and span B<chroot>(2) jails. The I<filesystemtype> and I<data> "
2672 "arguments are ignored. Up until Linux 2.6.26, I<mountflags> was also "
2673 "ignored (the bind mount has the same mount options as the underlying mount "
2678 #: build/C/man2/mount.2:122
2680 msgid "B<MS_DIRSYNC> (since Linux 2.5.19)"
2684 #: build/C/man2/mount.2:128
2686 "Make directory changes on this file system synchronous. (This property can "
2687 "be obtained for individual directories or subtrees using B<chattr>(1).)"
2691 #: build/C/man2/mount.2:128
2693 msgid "B<MS_MANDLOCK>"
2696 #. FIXME Say more about MS_MOVE
2698 #: build/C/man2/mount.2:135
2700 "Permit mandatory locking on files in this file system. (Mandatory locking "
2701 "must still be enabled on a per-file basis, as described in B<fcntl>(2).)"
2705 #: build/C/man2/mount.2:135
2711 #: build/C/man2/mount.2:146
2713 "Move a subtree. I<source> specifies an existing mount point and I<target> "
2714 "specifies the new location. The move is atomic: at no point is the subtree "
2715 "unmounted. The I<filesystemtype>, I<mountflags>, and I<data> arguments are "
2720 #: build/C/man2/mount.2:146
2722 msgid "B<MS_NOATIME>"
2726 #: build/C/man2/mount.2:149
2727 msgid "Do not update access times for (all types of) files on this file system."
2731 #: build/C/man2/mount.2:149
2737 #: build/C/man2/mount.2:152
2738 msgid "Do not allow access to devices (special files) on this file system."
2742 #: build/C/man2/mount.2:152
2744 msgid "B<MS_NODIRATIME>"
2748 #: build/C/man2/mount.2:161
2750 "Do not update access times for directories on this file system. This flag "
2751 "provides a subset of the functionality provided by B<MS_NOATIME>; that is, "
2752 "B<MS_NOATIME> implies B<MS_NODIRATIME>."
2756 #: build/C/man2/mount.2:161
2758 msgid "B<MS_NOEXEC>"
2761 #. (Possibly useful for a file system that contains non-Linux executables.
2762 #. Often used as a security feature, e.g., to make sure that restricted
2763 #. users cannot execute files uploaded using ftp or so.)
2765 #: build/C/man2/mount.2:167
2766 msgid "Do not allow programs to be executed from this file system."
2770 #: build/C/man2/mount.2:167
2772 msgid "B<MS_NOSUID>"
2775 #. (This is a security feature to prevent users executing set-user-ID and
2776 #. set-group-ID programs from removable disk devices.)
2778 #: build/C/man2/mount.2:173
2780 "Do not honor set-user-ID and set-group-ID bits when executing programs from "
2785 #: build/C/man2/mount.2:173
2787 msgid "B<MS_RDONLY>"
2791 #. FIXME Document MS_REC, available since 2.4.11.
2792 #. This flag has meaning in conjunction with MS_BIND and
2793 #. also with the shared subtree flags.
2795 #: build/C/man2/mount.2:180
2796 msgid "Mount file system read-only."
2800 #: build/C/man2/mount.2:180
2802 msgid "B<MS_RELATIME> (Since Linux 2.6.20)"
2805 #. Matthew Garrett notes in the patch that added this behavior
2806 #. that this lets utilities such as tmpreaper (which deletes
2807 #. files based on last acces time) work correctly.
2809 #: build/C/man2/mount.2:201
2811 "When a file on this file system is accessed, only update the file's last "
2812 "access time (atime) if the current value of atime is less than or equal to "
2813 "the file's last modification time (mtime) or last status change time "
2814 "(ctime). This option is useful for programs, such as B<mutt>(1), that need "
2815 "to know when a file has been read since it was last modified. Since Linux "
2816 "2.6.30, the kernel defaults to the behavior provided by this flag (unless "
2817 "B<MS_NOATIME> was specified), and the B<MS_STRICTATIME> flag is required to "
2818 "obtain traditional semantics. In addition, since Linux 2.6.30, the file's "
2819 "last access time is always updated if it is more than 1 day old."
2823 #: build/C/man2/mount.2:201
2825 msgid "B<MS_REMOUNT>"
2829 #: build/C/man2/mount.2:217
2831 "Remount an existing mount. This allows you to change the I<mountflags> and "
2832 "I<data> of an existing mount without having to unmount and remount the file "
2833 "system. I<source> and I<target> should be the same values specified in the "
2834 "initial B<mount>() call; I<filesystemtype> is ignored."
2838 #: build/C/man2/mount.2:232
2840 "The following I<mountflags> can be changed: B<MS_RDONLY>, B<MS_SYNCHRONOUS>, "
2841 "B<MS_MANDLOCK>; before kernel 2.6.16, the following could also be changed: "
2842 "B<MS_NOATIME> and B<MS_NODIRATIME>; and, additionally, before kernel 2.4.10, "
2843 "the following could also be changed: B<MS_NOSUID>, B<MS_NODEV>, "
2848 #: build/C/man2/mount.2:232
2850 msgid "B<MS_SILENT> (since Linux 2.6.17)"
2854 #: build/C/man2/mount.2:240
2856 "Suppress the display of certain (I<printk>()) warning messages in the "
2857 "kernel log. This flag supersedes the misnamed and obsolete B<MS_VERBOSE> "
2858 "flag (available since Linux 2.4.12), which has the same meaning."
2862 #: build/C/man2/mount.2:240
2864 msgid "B<MS_STRICTATIME> (Since Linux 2.6.30)"
2868 #: build/C/man2/mount.2:250
2870 "Always update the last access time (atime) when files on this file system "
2871 "are accessed. (This was the default behavior before Linux 2.6.30.) "
2872 "Specifying this flag overrides the effect of setting the B<MS_NOATIME> and "
2873 "B<MS_RELATIME> flags."
2877 #: build/C/man2/mount.2:250
2879 msgid "B<MS_SYNCHRONOUS>"
2883 #: build/C/man2/mount.2:258
2885 "Make writes on this file system synchronous (as though the B<O_SYNC> flag to "
2886 "B<open>(2) was specified for all file opens to this file system)."
2890 #: build/C/man2/mount.2:270
2892 "From Linux 2.4 onward, the B<MS_NODEV>, B<MS_NOEXEC>, and B<MS_NOSUID> flags "
2893 "are settable on a per-mount-point basis. From kernel 2.6.16 onward, "
2894 "B<MS_NOATIME> and B<MS_NODIRATIME> are also settable on a per-mount-point "
2895 "basis. The B<MS_RELATIME> flag is also settable on a per-mount-point basis."
2899 #: build/C/man2/mount.2:279
2901 "The I<data> argument is interpreted by the different file systems. "
2902 "Typically it is a string of comma-separated options understood by this file "
2903 "system. See B<mount>(8) for details of the options available for each "
2908 #: build/C/man2/mount.2:284 build/C/man2/stat.2:305 build/C/man2/statfs.2:132 build/C/man3/statvfs.3:99 build/C/man2/umount.2:104
2910 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
2915 #: build/C/man2/mount.2:290
2917 "The error values given below result from filesystem type independent "
2918 "errors. Each file-system type may have its own special errors and its own "
2919 "special behavior. See the kernel source code for details."
2923 #: build/C/man2/mount.2:290 build/C/man2/spu_create.2:169 build/C/man2/stat.2:306 build/C/man2/statfs.2:133 build/C/man3/statvfs.3:100
2928 #. mtk: Probably: write permission is required for MS_BIND, with
2929 #. the error EPERM if not present; CAP_DAC_OVERRIDE is required.
2931 #: build/C/man2/mount.2:305
2933 "A component of a path was not searchable. (See also B<path_resolution>(7).) "
2934 "Or, mounting a read-only file system was attempted without giving the "
2935 "B<MS_RDONLY> flag. Or, the block device I<source> is located on a file "
2936 "system mounted with the B<MS_NODEV> option."
2940 #: build/C/man2/mount.2:305 build/C/man2/umount.2:117
2946 #: build/C/man2/mount.2:317
2948 "I<source> is already mounted. Or, it cannot be remounted read-only, because "
2949 "it still holds files open for writing. Or, it cannot be mounted on "
2950 "I<target> because I<target> is still busy (it is the working directory of "
2951 "some thread, the mount point of another device, has open files, etc.)."
2955 #: build/C/man2/mount.2:317 build/C/man2/spu_create.2:177 build/C/man2/spu_run.2:154 build/C/man2/stat.2:317 build/C/man2/statfs.2:145 build/C/man3/statvfs.3:112 build/C/man2/sysfs.2:78 build/C/man2/umount.2:121 build/C/man2/ustat.2:76
2961 #: build/C/man2/mount.2:320
2962 msgid "One of the pointer arguments points outside the user address space."
2966 #: build/C/man2/mount.2:335
2968 "I<source> had an invalid superblock. Or, a remount (B<MS_REMOUNT>) was "
2969 "attempted, but I<source> was not already mounted on I<target>. Or, a move "
2970 "(B<MS_MOVE>) was attempted, but I<source> was not a mount point, or was "
2975 #: build/C/man2/mount.2:335 build/C/man2/spu_create.2:188 build/C/man2/stat.2:320 build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
2981 #: build/C/man2/mount.2:342
2983 "Too many links encountered during pathname resolution. Or, a move was "
2984 "attempted, while I<target> is a descendant of I<source>."
2988 #: build/C/man2/mount.2:342 build/C/man2/spu_create.2:192
2994 #: build/C/man2/mount.2:346
2995 msgid "(In case no block device is required:) Table of dummy devices is full."
2999 #: build/C/man2/mount.2:346 build/C/man2/spu_create.2:195 build/C/man2/stat.2:323 build/C/man2/statfs.2:162 build/C/man3/statvfs.3:129 build/C/man2/umount.2:137
3001 msgid "B<ENAMETOOLONG>"
3005 #: build/C/man2/mount.2:350 build/C/man2/umount.2:141
3006 msgid "A pathname was longer than B<MAXPATHLEN>."
3010 #: build/C/man2/mount.2:350 build/C/man2/spu_create.2:202
3016 #: build/C/man2/mount.2:354
3017 msgid "I<filesystemtype> not configured in the kernel."
3021 #: build/C/man2/mount.2:354 build/C/man2/spu_create.2:206 build/C/man2/stat.2:327 build/C/man2/statfs.2:167 build/C/man3/statvfs.3:134 build/C/man2/umount.2:141
3027 #: build/C/man2/mount.2:357 build/C/man2/umount.2:144
3028 msgid "A pathname was empty or had a nonexistent component."
3032 #: build/C/man2/mount.2:357 build/C/man2/spu_create.2:211 build/C/man2/spu_run.2:175 build/C/man2/stat.2:334 build/C/man2/statfs.2:173 build/C/man3/statvfs.3:140 build/C/man2/umount.2:144
3038 #: build/C/man2/mount.2:360 build/C/man2/umount.2:147
3039 msgid "The kernel could not allocate a free page to copy filenames or data into."
3043 #: build/C/man2/mount.2:360
3049 #: build/C/man2/mount.2:364
3050 msgid "I<source> is not a block device (and a device was required)."
3054 #: build/C/man2/mount.2:364 build/C/man2/spu_create.2:224 build/C/man2/stat.2:337 build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
3060 #: build/C/man2/mount.2:370
3061 msgid "I<target>, or a prefix of I<source>, is not a directory."
3065 #: build/C/man2/mount.2:370
3071 #: build/C/man2/mount.2:375
3072 msgid "The major number of the block device I<source> is out of range."
3076 #: build/C/man2/mount.2:375 build/C/man2/spu_create.2:229 build/C/man2/umount.2:147
3082 #: build/C/man2/mount.2:378 build/C/man2/umount.2:150
3083 msgid "The caller does not have the required privileges."
3086 #. FIXME: Definitions of the so-far-undocumented MS_UNBINDABLE, MS_PRIVATE,
3087 #. MS_SHARED, and MS_SLAVE were (also) only added to glibc headers in 2.12.
3089 #: build/C/man2/mount.2:389
3091 "The definitions of B<MS_DIRSYNC>, B<MS_MOVE>, B<MS_REC>, B<MS_RELATIME>, and "
3092 "B<MS_STRICTATIME> were only added to glibc headers in version 2.12."
3096 #: build/C/man2/mount.2:392
3098 "This function is Linux-specific and should not be used in programs intended "
3103 #: build/C/man2/mount.2:401
3105 "The original B<MS_SYNC> flag was renamed B<MS_SYNCHRONOUS> in 1.1.69 when a "
3106 "different B<MS_SYNC> was added to I<E<lt>mman.hE<gt>>."
3109 #. The change is in patch-2.4.0-prerelease.
3111 #: build/C/man2/mount.2:410
3113 "Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program "
3114 "on a file system mounted with B<MS_NOSUID> would fail with B<EPERM>. Since "
3115 "Linux 2.4 the set-user-ID and set-group-ID bits are just silently ignored in "
3120 #: build/C/man2/mount.2:410
3122 msgid "Per-process Namespaces"
3126 #: build/C/man2/mount.2:421
3128 "Starting with kernel 2.4.19, Linux provides per-process mount namespaces. A "
3129 "mount namespace is the set of file system mounts that are visible to a "
3130 "process. Mount-point namespaces can be (and usually are) shared between "
3131 "multiple processes, and changes to the namespace (i.e., mounts and unmounts) "
3132 "by one process are visible to all other processes sharing the same "
3133 "namespace. (The pre-2.4.19 Linux situation can be considered as one in "
3134 "which a single namespace was shared by every process on the system.)"
3138 #: build/C/man2/mount.2:427
3140 "A child process created by B<fork>(2) shares its parent's mount namespace; "
3141 "the mount namespace is preserved across an B<execve>(2)."
3145 #: build/C/man2/mount.2:447
3147 "A process can obtain a private mount namespace if: it was created using the "
3148 "B<clone>(2) B<CLONE_NEWNS> flag, in which case its new namespace is "
3149 "initialized to be a I<copy> of the namespace of the process that called "
3150 "B<clone>(2); or it calls B<unshare>(2) with the B<CLONE_NEWNS> flag, which "
3151 "causes the caller's mount namespace to obtain a private copy of the "
3152 "namespace that it was previously sharing with other processes, so that "
3153 "future mounts and unmounts by the caller are invisible to other processes "
3154 "(except child processes that the caller subsequently creates) and vice "
3159 #: build/C/man2/mount.2:454
3161 "The Linux-specific I</proc/PID/mounts> file exposes the list of mount points "
3162 "in the mount namespace of the process with the specified ID; see B<proc>(5) "
3167 #: build/C/man2/mount.2:459
3168 msgid "B<umount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
3172 #: build/C/man7/path_resolution.7:23
3174 msgid "PATH_RESOLUTION"
3178 #: build/C/man7/path_resolution.7:23
3184 #: build/C/man7/path_resolution.7:26
3185 msgid "path_resolution - how a pathname is resolved to a file"
3189 #: build/C/man7/path_resolution.7:29
3191 "Some UNIX/Linux system calls have as parameter one or more filenames. A "
3192 "filename (or pathname) is resolved as follows."
3196 #: build/C/man7/path_resolution.7:29
3198 msgid "Step 1: Start of the resolution process"
3202 #: build/C/man7/path_resolution.7:48
3204 "If the pathname starts with the \\(aq/\\(aq character, the starting lookup "
3205 "directory is the root directory of the calling process. (A process inherits "
3206 "its root directory from its parent. Usually this will be the root directory "
3207 "of the file hierarchy. A process may get a different root directory by use "
3208 "of the B<chroot>(2) system call. A process may get an entirely private "
3209 "mount namespace in case it\\(emor one of its ancestors\\(emwas started by an "
3210 "invocation of the B<clone>(2) system call that had the B<CLONE_NEWNS> flag "
3211 "set.) This handles the \\(aq/\\(aq part of the pathname."
3215 #: build/C/man7/path_resolution.7:56
3217 "If the pathname does not start with the \\(aq/\\(aq character, the starting "
3218 "lookup directory of the resolution process is the current working directory "
3219 "of the process. (This is also inherited from the parent. It can be changed "
3220 "by use of the B<chdir>(2) system call.)"
3224 #: build/C/man7/path_resolution.7:59
3226 "Pathnames starting with a \\(aq/\\(aq character are called absolute "
3227 "pathnames. Pathnames not starting with a \\(aq/\\(aq are called relative "
3232 #: build/C/man7/path_resolution.7:59
3234 msgid "Step 2: Walk along the path"
3238 #: build/C/man7/path_resolution.7:64
3240 "Set the current lookup directory to the starting lookup directory. Now, for "
3241 "each nonfinal component of the pathname, where a component is a substring "
3242 "delimited by \\(aq/\\(aq characters, this component is looked up in the "
3243 "current lookup directory."
3247 #: build/C/man7/path_resolution.7:70
3249 "If the process does not have search permission on the current lookup "
3250 "directory, an B<EACCES> error is returned (\"Permission denied\")."
3254 #: build/C/man7/path_resolution.7:75
3256 "If the component is not found, an B<ENOENT> error is returned (\"No such "
3257 "file or directory\")."
3261 #: build/C/man7/path_resolution.7:80
3263 "If the component is found, but is neither a directory nor a symbolic link, "
3264 "an B<ENOTDIR> error is returned (\"Not a directory\")."
3268 #: build/C/man7/path_resolution.7:84
3270 "If the component is found and is a directory, we set the current lookup "
3271 "directory to that directory, and go to the next component."
3275 #. presently: max recursion depth during symlink resolution: 5
3276 #. max total number of symbolic links followed: 40
3277 #. _POSIX_SYMLOOP_MAX is 8
3279 #: build/C/man7/path_resolution.7:108
3281 "If the component is found and is a symbolic link (symlink), we first resolve "
3282 "this symbolic link (with the current lookup directory as starting lookup "
3283 "directory). Upon error, that error is returned. If the result is not a "
3284 "directory, an B<ENOTDIR> error is returned. If the resolution of the "
3285 "symlink is successful and returns a directory, we set the current lookup "
3286 "directory to that directory, and go to the next component. Note that the "
3287 "resolution process here involves recursion. In order to protect the kernel "
3288 "against stack overflow, and also to protect against denial of service, there "
3289 "are limits on the maximum recursion depth, and on the maximum number of "
3290 "symbolic links followed. An B<ELOOP> error is returned when the maximum is "
3291 "exceeded (\"Too many levels of symbolic links\")."
3295 #: build/C/man7/path_resolution.7:108
3297 msgid "Step 3: Find the final entry"
3301 #: build/C/man7/path_resolution.7:120
3303 "The lookup of the final component of the pathname goes just like that of all "
3304 "other components, as described in the previous step, with two differences: "
3305 "(i) the final component need not be a directory (at least as far as the path "
3306 "resolution process is concerned\\(emit may have to be a directory, or a "
3307 "nondirectory, because of the requirements of the specific system call), and "
3308 "(ii) it is not necessarily an error if the component is not found\\(emmaybe "
3309 "we are just creating it. The details on the treatment of the final entry "
3310 "are described in the manual pages of the specific system calls."
3314 #: build/C/man7/path_resolution.7:120
3320 #: build/C/man7/path_resolution.7:124
3322 "By convention, every directory has the entries \".\" and \"..\", which refer "
3323 "to the directory itself and to its parent directory, respectively."
3327 #: build/C/man7/path_resolution.7:128
3329 "The path resolution process will assume that these entries have their "
3330 "conventional meanings, regardless of whether they are actually present in "
3331 "the physical file system."
3335 #: build/C/man7/path_resolution.7:130
3336 msgid "One cannot walk down past the root: \"/..\" is the same as \"/\"."
3340 #: build/C/man7/path_resolution.7:130
3342 msgid "Mount points"
3346 #: build/C/man7/path_resolution.7:134
3348 "After a \"mount dev path\" command, the pathname \"path\" refers to the root "
3349 "of the file system hierarchy on the device \"dev\", and no longer to "
3350 "whatever it referred to earlier."
3354 #: build/C/man7/path_resolution.7:138
3356 "One can walk out of a mounted file system: \"path/..\" refers to the parent "
3357 "directory of \"path\", outside of the file system hierarchy on \"dev\"."
3361 #: build/C/man7/path_resolution.7:138
3363 msgid "Trailing slashes"
3367 #: build/C/man7/path_resolution.7:144
3369 "If a pathname ends in a \\(aq/\\(aq, that forces resolution of the preceding "
3370 "component as in Step 2: it has to exist and resolve to a directory. "
3371 "Otherwise a trailing \\(aq/\\(aq is ignored. (Or, equivalently, a pathname "
3372 "with a trailing \\(aq/\\(aq is equivalent to the pathname obtained by "
3373 "appending \\(aq.\\(aq to it.)"
3377 #: build/C/man7/path_resolution.7:144
3379 msgid "Final symlink"
3383 #: build/C/man7/path_resolution.7:153
3385 "If the last component of a pathname is a symbolic link, then it depends on "
3386 "the system call whether the file referred to will be the symbolic link or "
3387 "the result of path resolution on its contents. For example, the system call "
3388 "B<lstat>(2) will operate on the symlink, while B<stat>(2) operates on the "
3389 "file pointed to by the symlink."
3393 #: build/C/man7/path_resolution.7:153
3395 msgid "Length limit"
3399 #: build/C/man7/path_resolution.7:160
3401 "There is a maximum length for pathnames. If the pathname (or some "
3402 "intermediate pathname obtained while resolving symbolic links) is too long, "
3403 "an B<ENAMETOOLONG> error is returned (\"Filename too long\")."
3407 #: build/C/man7/path_resolution.7:160
3409 msgid "Empty pathname"
3413 #: build/C/man7/path_resolution.7:167
3415 "In the original UNIX, the empty pathname referred to the current directory. "
3416 "Nowadays POSIX decrees that an empty pathname must not be resolved "
3417 "successfully. Linux returns B<ENOENT> in this case."
3421 #: build/C/man7/path_resolution.7:167
3427 #: build/C/man7/path_resolution.7:180
3429 "The permission bits of a file consist of three groups of three bits, cf.\\& "
3430 "B<chmod>(1) and B<stat>(2). The first group of three is used when the "
3431 "effective user ID of the calling process equals the owner ID of the file. "
3432 "The second group of three is used when the group ID of the file either "
3433 "equals the effective group ID of the calling process, or is one of the "
3434 "supplementary group IDs of the calling process (as set by B<setgroups>(2)). "
3435 "When neither holds, the third group is used."
3439 #: build/C/man7/path_resolution.7:184
3441 "Of the three bits used, the first bit determines read permission, the second "
3442 "write permission, and the last execute permission in case of ordinary files, "
3443 "or search permission in case of directories."
3447 #: build/C/man7/path_resolution.7:189
3449 "Linux uses the fsuid instead of the effective user ID in permission checks. "
3450 "Ordinarily the fsuid will equal the effective user ID, but the fsuid can be "
3451 "changed by the system call B<setfsuid>(2)."
3455 #: build/C/man7/path_resolution.7:197
3457 "(Here \"fsuid\" stands for something like \"file system user ID\". The "
3458 "concept was required for the implementation of a user space NFS server at a "
3459 "time when processes could send a signal to a process with the same effective "
3460 "user ID. It is obsolete now. Nobody should use B<setfsuid>(2).)"
3463 #. FIXME say something about file system mounted read-only ?
3465 #: build/C/man7/path_resolution.7:203
3467 "Similarly, Linux uses the fsgid (\"file system group ID\") instead of the "
3468 "effective group ID. See B<setfsgid>(2)."
3472 #: build/C/man7/path_resolution.7:203
3474 msgid "Bypassing permission checks: superuser and capabilities"
3477 #. (but for exec at least one x bit must be set) -- AEB
3478 #. but there is variation across systems on this point: for
3479 #. example, HP-UX and Tru64 are as described by AEB. However,
3480 #. on some implementations (e.g., Solaris, FreeBSD),
3481 #. access(X_OK) by superuser will report success, regardless
3482 #. of the file's execute permission bits. -- MTK (Oct 05)
3484 #: build/C/man7/path_resolution.7:214
3486 "On a traditional UNIX system, the superuser (I<root>, user ID 0) is "
3487 "all-powerful, and bypasses all permissions restrictions when accessing "
3492 #: build/C/man7/path_resolution.7:220
3494 "On Linux, superuser privileges are divided into capabilities (see "
3495 "B<capabilities>(7)). Two capabilities are relevant for file permissions "
3496 "checks: B<CAP_DAC_OVERRIDE> and B<CAP_DAC_READ_SEARCH>. (A process has "
3497 "these capabilities if its fsuid is 0.)"
3501 #: build/C/man7/path_resolution.7:224
3503 "The B<CAP_DAC_OVERRIDE> capability overrides all permission checking, but "
3504 "only grants execute permission when at least one of the file's three execute "
3505 "permission bits is set."
3508 #. FIXME say something about immutable files
3509 #. FIXME say something about ACLs
3511 #: build/C/man7/path_resolution.7:229
3513 "The B<CAP_DAC_READ_SEARCH> capability grants read and search permission on "
3514 "directories, and read permission on ordinary files."
3518 #: build/C/man7/path_resolution.7:234
3519 msgid "B<readlink>(2), B<capabilities>(7), B<credentials>(7), B<symlink>(7)"
3523 #: build/C/man2/removexattr.2:27
3529 #: build/C/man2/removexattr.2:30
3530 msgid "removexattr, lremovexattr, fremovexattr - remove an extended attribute"
3534 #: build/C/man2/removexattr.2:39
3537 "B<int removexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3538 "B<int lremovexattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<);>\n"
3539 "B<int fremovexattr(int >I<fd>B<, const char\\ *>I<name>B<);>\n"
3543 #: build/C/man2/removexattr.2:51
3545 "Extended attributes are I<name>:value pairs associated with inodes (files, "
3546 "directories, symbolic links, etc.). They are extensions to the normal "
3547 "attributes which are associated with all inodes in the system (i.e., the "
3548 "B<stat>(2) data). A complete overview of extended attributes concepts can "
3549 "be found in B<attr>(5)."
3553 #: build/C/man2/removexattr.2:58
3555 "B<removexattr>() removes the extended attribute identified by I<name> and "
3556 "associated with the given I<path> in the file system."
3560 #: build/C/man2/removexattr.2:64
3562 "B<lremovexattr>() is identical to B<removexattr>(), except in the case of a "
3563 "symbolic link, where the extended attribute is removed from the link itself, "
3564 "not the file that it refers to."
3568 #: build/C/man2/removexattr.2:74
3570 "B<fremovexattr>() is identical to B<removexattr>(), only the extended "
3571 "attribute is removed from the open file referred to by I<fd> (as returned by "
3572 "B<open>(2)) in place of I<path>."
3576 #: build/C/man2/removexattr.2:80
3578 "An extended attribute name is a simple null-terminated string. The I<name> "
3579 "includes a namespace prefix; there may be several, disjoint namespaces "
3580 "associated with an individual inode."
3584 #: build/C/man2/removexattr.2:85 build/C/man2/setxattr.2:112
3586 "On success, zero is returned. On failure, -1 is returned and I<errno> is "
3587 "set appropriately."
3591 #: build/C/man2/removexattr.2:90
3592 msgid "If the named attribute does not exist, I<errno> is set to B<ENOATTR>."
3596 #: build/C/man2/removexattr.2:120
3598 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3599 "B<setxattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3603 #: build/C/man2/setxattr.2:27
3609 #: build/C/man2/setxattr.2:27
3615 #: build/C/man2/setxattr.2:30
3616 msgid "setxattr, lsetxattr, fsetxattr - set an extended attribute value"
3620 #: build/C/man2/setxattr.2:42
3623 "B<int setxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3624 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3626 "B<int lsetxattr(const char\\ *>I<path>B<, const char\\ *>I<name>B<,>\n"
3627 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3629 "B<int fsetxattr(int >I<fd>B<, const char\\ *>I<name>B<,>\n"
3630 "B< const void\\ *>I<value>B<, size_t >I<size>B<, int "
3635 #: build/C/man2/setxattr.2:69
3637 "B<setxattr>() sets the I<value> of the extended attribute identified by "
3638 "I<name> and associated with the given I<path> in the file system. The "
3639 "I<size> of the I<value> must be specified."
3643 #: build/C/man2/setxattr.2:75
3645 "B<lsetxattr>() is identical to B<setxattr>(), except in the case of a "
3646 "symbolic link, where the extended attribute is set on the link itself, not "
3647 "the file that it refers to."
3651 #: build/C/man2/setxattr.2:85
3653 "B<fsetxattr>() is identical to B<setxattr>(), only the extended attribute "
3654 "is set on the open file referred to by I<fd> (as returned by B<open>(2)) in "
3659 #: build/C/man2/setxattr.2:95
3661 "An extended attribute name is a simple null-terminated string. The I<name> "
3662 "includes a namespace prefix; there may be several, disjoint namespaces "
3663 "associated with an individual inode. The I<value> of an extended attribute "
3664 "is a chunk of arbitrary textual or binary data of specified length."
3668 #: build/C/man2/setxattr.2:107
3670 "The I<flags> argument can be used to refine the semantics of the operation. "
3671 "B<XATTR_CREATE> specifies a pure create, which fails if the named attribute "
3672 "exists already. B<XATTR_REPLACE> specifies a pure replace operation, which "
3673 "fails if the named attribute does not already exist. By default (no flags), "
3674 "the extended attribute will be created if need be, or will simply replace "
3675 "the value if the attribute exists."
3679 #: build/C/man2/setxattr.2:125
3681 "If B<XATTR_CREATE> is specified, and the attribute exists already, I<errno> "
3682 "is set to B<EEXIST>. If B<XATTR_REPLACE> is specified, and the attribute "
3683 "does not exist, I<errno> is set to B<ENOATTR>."
3687 #: build/C/man2/setxattr.2:133
3689 "If there is insufficient space remaining to store the extended attribute, "
3690 "I<errno> is set to either B<ENOSPC>, or B<EDQUOT> if quota enforcement was "
3695 #: build/C/man2/setxattr.2:163
3697 "B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<listxattr>(2), B<open>(2), "
3698 "B<removexattr>(2), B<stat>(2), B<attr>(5), B<symlink>(7)"
3702 #: build/C/man2/spu_create.2:24
3708 #: build/C/man2/spu_create.2:24 build/C/man7/spufs.7:26
3714 #: build/C/man2/spu_create.2:27
3715 msgid "spu_create - create a new spu context"
3719 #: build/C/man2/spu_create.2:31
3722 "B<#include E<lt>sys/types.hE<gt>>\n"
3723 "B<#include E<lt>sys/spu.hE<gt>>\n"
3727 #: build/C/man2/spu_create.2:35
3730 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3732 "B<int spu_create(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
3734 "B< int >I<neighbor_fd>B<);>\n"
3738 #: build/C/man2/spu_create.2:55
3740 "The B<spu_create>() system call is used on PowerPC machines that implement "
3741 "the Cell Broadband Engine Architecture in order to access Synergistic "
3742 "Processor Units (SPUs). It creates a new logical context for an SPU in "
3743 "I<pathname> and returns a file descriptor associated with it. I<pathname> "
3744 "must refer to a nonexistent directory in the mount point of the SPU file "
3745 "system (B<spufs>). If B<spu_create>() is successful, a directory is "
3746 "created at I<pathname> and it is populated with the files described in "
3751 #: build/C/man2/spu_create.2:74
3753 "When a context is created, the returned file descriptor can only be passed "
3754 "to B<spu_run>(2), used as the I<dirfd> argument to the B<*at> family of "
3755 "system calls (e.g., B<openat>(2)), or closed; other operations are not "
3756 "defined. A logical SPU context is destroyed (along with all files created "
3757 "within the context's I<pathname> directory) once the last reference to the "
3758 "context has gone; this usually occurs when the file descriptor returned by "
3759 "B<spu_create>() is closed."
3763 #: build/C/man2/spu_create.2:79
3765 "The I<flags> argument can be zero or any bitwise OR-ed combination of the "
3766 "following constants:"
3770 #: build/C/man2/spu_create.2:79
3772 msgid "B<SPU_CREATE_EVENTS_ENABLED>"
3776 #: build/C/man2/spu_create.2:85
3778 "Rather than using signals for reporting DMA errors, use the I<event> "
3779 "argument to B<spu_run>(2)."
3783 #: build/C/man2/spu_create.2:85
3785 msgid "B<SPU_CREATE_GANG>"
3789 #: build/C/man2/spu_create.2:93
3791 "Create an SPU gang instead of a context. (A gang is a group of SPU contexts "
3792 "that are functionally related to each other and which share common "
3793 "scheduling parameters\\(empriority and policy. In the future, gang "
3794 "scheduling may be implemented causing the group to be switched in and out as "
3799 #: build/C/man2/spu_create.2:100
3801 "A new directory will be created at the location specified by the I<pathname> "
3802 "argument. This gang may be used to hold other SPU contexts, by providing a "
3803 "pathname that is within the gang directory to further calls to "
3808 #: build/C/man2/spu_create.2:100
3810 msgid "B<SPU_CREATE_NOSCHED>"
3814 #: build/C/man2/spu_create.2:106
3816 "Create a context that is not affected by the SPU scheduler. Once the "
3817 "context is run, it will not be scheduled out until it is destroyed by the "
3822 #: build/C/man2/spu_create.2:117
3824 "Because the context cannot be removed from the SPU, some functionality is "
3825 "disabled for B<SPU_CREATE_NOSCHED> contexts. Only a subset of the files "
3826 "will be available in this context directory in B<spufs>. Additionally, "
3827 "B<SPU_CREATE_NOSCHED> contexts cannot dump a core file when crashing."
3831 #: build/C/man2/spu_create.2:123
3833 "Creating B<SPU_CREATE_NOSCHED> contexts requires the B<CAP_SYS_NICE> "
3838 #: build/C/man2/spu_create.2:123
3840 msgid "B<SPU_CREATE_ISOLATE>"
3844 #: build/C/man2/spu_create.2:130
3846 "Create an isolated SPU context. Isolated contexts are protected from some "
3847 "PPE (PowerPC Processing Element) operations, such as access to the SPU "
3848 "local store and the NPC register."
3852 #: build/C/man2/spu_create.2:136
3854 "Creating B<SPU_CREATE_ISOLATE> contexts also requires the "
3855 "B<SPU_CREATE_NOSCHED> flag."
3859 #: build/C/man2/spu_create.2:136
3861 msgid "B<SPU_CREATE_AFFINITY_SPU>"
3865 #: build/C/man2/spu_create.2:144
3867 "Create a context with affinity to another SPU context. This affinity "
3868 "information is used within the SPU scheduling algorithm. Using this flag "
3869 "requires that a file descriptor referring to the other SPU context be passed "
3870 "in the I<neighbor_fd> argument."
3874 #: build/C/man2/spu_create.2:144
3876 msgid "B<SPU_CREATE_AFFINITY_MEM>"
3880 #: build/C/man2/spu_create.2:149
3882 "Create a context with affinity to system memory. This affinity information "
3883 "is used within the SPU scheduling algorithm."
3887 #: build/C/man2/spu_create.2:161
3889 "The I<mode> argument (minus any bits set in the process's B<umask>(2)) "
3890 "specifies the permissions used for creating the new directory in B<spufs>. "
3891 "See B<stat>(2) for a full list of the possible I<mode> values."
3895 #: build/C/man2/spu_create.2:168
3897 "On success, B<spu_create>() returns a new file descriptor. On error, -1 is "
3898 "returned, and I<errno> is set to one of the error codes listed below."
3902 #: build/C/man2/spu_create.2:174
3903 msgid "The current user does not have write access to the B<spufs>(7) mount point."
3907 #: build/C/man2/spu_create.2:174
3913 #: build/C/man2/spu_create.2:177
3914 msgid "An SPU context already exists at the given path name."
3918 #: build/C/man2/spu_create.2:182
3920 "I<pathname> is not a valid string pointer in the calling process's address "
3925 #: build/C/man2/spu_create.2:188
3927 "I<pathname> is not a directory in the B<spufs>(7) mount point, or invalid "
3928 "flags have been provided."
3932 #: build/C/man2/spu_create.2:192
3933 msgid "Too many symbolic links were found while resolving I<pathname>."
3937 #: build/C/man2/spu_create.2:195
3938 msgid "The process has reached its maximum open files limit."
3942 #: build/C/man2/spu_create.2:199
3943 msgid "I<pathname> is too long."
3947 #: build/C/man2/spu_create.2:199
3953 #: build/C/man2/spu_create.2:202
3954 msgid "The system has reached the global open files limit."
3958 #: build/C/man2/spu_create.2:206
3960 "An isolated context was requested, but the hardware does not support SPU "
3965 #: build/C/man2/spu_create.2:211
3966 msgid "Part of I<pathname> could not be resolved."
3970 #: build/C/man2/spu_create.2:214
3971 msgid "The kernel could not allocate all resources required."
3975 #: build/C/man2/spu_create.2:214
3981 #: build/C/man2/spu_create.2:219
3983 "There are not enough SPU resources available to create a new context or the "
3984 "user-specific limit for the number of SPU contexts has been reached."
3988 #: build/C/man2/spu_create.2:219 build/C/man2/spu_run.2:179 build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143 build/C/man2/ustat.2:84
3994 #: build/C/man2/spu_create.2:224 build/C/man2/spu_run.2:184
3996 "The functionality is not provided by the current system, because either the "
3997 "hardware does not provide SPUs or the spufs module is not loaded."
4001 #: build/C/man2/spu_create.2:229
4002 msgid "A part of I<pathname> is not a directory."
4006 #: build/C/man2/spu_create.2:236
4008 "The I<SPU_CREATE_NOSCHED> flag has been given, but the user does not have "
4009 "the B<CAP_SYS_NICE> capability."
4013 #: build/C/man2/spu_create.2:242
4015 "I<pathname> must point to a location beneath the mount point of B<spufs>. "
4016 "By convention, it gets mounted in I</spu>."
4020 #: build/C/man2/spu_create.2:246
4021 msgid "The B<spu_create>() system call was added to Linux in kernel 2.6.16."
4025 #: build/C/man2/spu_create.2:250
4027 "This call is Linux-specific and only implemented on the PowerPC "
4028 "architecture. Programs using this system call are not portable."
4032 #: build/C/man2/spu_create.2:260
4034 "Glibc does not provide a wrapper for this system call; call it using "
4035 "B<syscall>(2). Note however, that B<spu_create>() is meant to be used from "
4036 "libraries that implement a more abstract interface to SPUs, not to be used "
4037 "from regular applications. See "
4038 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4043 #: build/C/man2/spu_create.2:265
4044 msgid "See B<spu_run>(2) for an example of the use of B<spu_create>()"
4048 #: build/C/man2/spu_create.2:270
4049 msgid "B<close>(2), B<spu_run>(2), B<capabilities>(7), B<spufs>(7)"
4053 #: build/C/man2/spu_run.2:25
4059 #: build/C/man2/spu_run.2:25
4065 #: build/C/man2/spu_run.2:28
4066 msgid "spu_run - execute an SPU context"
4070 #: build/C/man2/spu_run.2:31
4072 msgid "B<#include E<lt>sys/spu.hE<gt>>\n"
4076 #: build/C/man2/spu_run.2:34
4079 "B<int spu_run(int >I<fd>B<, unsigned int *>I<npc>B<, unsigned int "
4084 #: build/C/man2/spu_run.2:49
4086 "The B<spu_run>() system call is used on PowerPC machines that implement the "
4087 "Cell Broadband Engine Architecture in order to access Synergistic Processor "
4088 "Units (SPUs). The I<fd> argument is a file descriptor returned by "
4089 "B<spu_create>(2) that refers to a specific SPU context. When the context "
4090 "gets scheduled to a physical SPU, it starts execution at the instruction "
4091 "pointer passed in I<npc>."
4095 #: build/C/man2/spu_run.2:58
4097 "Execution of SPU code happens synchronously, meaning that B<spu_run>() "
4098 "blocks while the SPU is still running. If there is a need to execute SPU "
4099 "code in parallel with other code on either the main CPU or other SPUs, a new "
4100 "thread of execution must be created first (e.g., using "
4101 "B<pthread_create>(3))."
4105 #: build/C/man2/spu_run.2:68
4107 "When B<spu_run>() returns, the current value of the SPU program counter is "
4108 "written to I<npc>, so successive calls to B<spu_run>() can use the same "
4113 #: build/C/man2/spu_run.2:78
4115 "The I<event> argument provides a buffer for an extended status code. If the "
4116 "SPU context was created with the B<SPU_CREATE_EVENTS_ENABLED> flag, then "
4117 "this buffer is populated by the Linux kernel before B<spu_run>() returns."
4121 #: build/C/man2/spu_run.2:80
4122 msgid "The status code may be one (or more) of the following constants:"
4126 #: build/C/man2/spu_run.2:80
4128 msgid "B<SPE_EVENT_DMA_ALIGNMENT>"
4132 #: build/C/man2/spu_run.2:83
4133 msgid "A DMA alignment error occurred."
4137 #: build/C/man2/spu_run.2:83
4139 msgid "B<SPE_EVENT_INVALID_DMA>"
4143 #: build/C/man2/spu_run.2:86
4144 msgid "An invalid MFC DMA command was attempted."
4148 #: build/C/man2/spu_run.2:86
4150 msgid "B<SPE_EVENT_SPE_DATA_STORAGE>"
4154 #: build/C/man2/spu_run.2:89
4155 msgid "A DMA storage error occurred."
4159 #: build/C/man2/spu_run.2:89
4161 msgid "B<SPE_EVENT_SPE_ERROR>"
4165 #: build/C/man2/spu_run.2:92
4166 msgid "An illegal instruction was executed."
4170 #: build/C/man2/spu_run.2:98
4172 "NULL is a valid value for the I<event> argument. In this case, the events "
4173 "will not be reported to the calling process."
4177 #: build/C/man2/spu_run.2:107
4179 "On success, B<spu_run>() returns the value of the I<spu_status> register. "
4180 "On error it returns -1 and sets I<errno> to one of the error codes listed "
4185 #: build/C/man2/spu_run.2:116
4187 "The I<spu_status> register value is a bit mask of status codes and "
4188 "optionally a 14-bit code returned from the B<stop-and-signal> instruction on "
4189 "the SPU. The bit masks for the status codes are:"
4193 #: build/C/man2/spu_run.2:116
4199 #: build/C/man2/spu_run.2:121
4200 msgid "SPU was stopped by a B<stop-and-signal> instruction."
4204 #: build/C/man2/spu_run.2:121
4210 #: build/C/man2/spu_run.2:126
4211 msgid "SPU was stopped by a B<halt> instruction."
4215 #: build/C/man2/spu_run.2:126
4221 #: build/C/man2/spu_run.2:129
4222 msgid "SPU is waiting for a channel."
4226 #: build/C/man2/spu_run.2:129
4232 #: build/C/man2/spu_run.2:132
4233 msgid "SPU is in single-step mode."
4237 #: build/C/man2/spu_run.2:132
4243 #: build/C/man2/spu_run.2:135
4244 msgid "SPU has tried to execute an invalid instruction."
4248 #: build/C/man2/spu_run.2:135
4254 #: build/C/man2/spu_run.2:138
4255 msgid "SPU has tried to access an invalid channel."
4259 #: build/C/man2/spu_run.2:138
4261 msgid "B<0x3fff0000>"
4265 #: build/C/man2/spu_run.2:144
4267 "The bits masked with this value contain the code returned from a "
4268 "B<stop-and-signal> instruction. These bits are only valid if the 0x02 bit "
4273 #: build/C/man2/spu_run.2:149
4275 "If B<spu_run>() has not returned an error, one or more bits among the lower "
4276 "eight ones are always set."
4280 #: build/C/man2/spu_run.2:150 build/C/man2/stat.2:313 build/C/man2/statfs.2:140 build/C/man3/statvfs.3:107
4286 #: build/C/man2/spu_run.2:154
4287 msgid "I<fd> is not a valid file descriptor."
4291 #: build/C/man2/spu_run.2:160
4293 "I<npc> is not a valid pointer, or I<event> is non-NULL and an invalid "
4298 #: build/C/man2/spu_run.2:160 build/C/man2/statfs.2:151 build/C/man3/statvfs.3:118
4304 #: build/C/man2/spu_run.2:170
4306 "A signal occurred while B<spu_run>() was in progress; see B<signal>(7). "
4307 "The I<npc> value has been updated to the new program counter value if "
4312 #: build/C/man2/spu_run.2:175
4313 msgid "I<fd> is not a valid file descriptor returned from B<spu_create>(2)."
4317 #: build/C/man2/spu_run.2:179
4319 "There was not enough memory available to handle a page fault resulting from "
4320 "a Memory Flow Controller (MFC) direct memory access."
4324 #: build/C/man2/spu_run.2:188
4325 msgid "The B<spu_run>() system call was added to Linux in kernel 2.6.16."
4329 #: build/C/man2/spu_run.2:192
4331 "This call is Linux-specific and only implemented by the PowerPC "
4332 "architecture. Programs using this system call are not portable."
4336 #: build/C/man2/spu_run.2:202
4338 "Glibc does not provide a wrapper for this system call; call it using "
4339 "B<syscall>(2). Note however, that B<spu_run>() is meant to be used from "
4340 "libraries that implement a more abstract interface to SPUs, not to be used "
4341 "from regular applications. See "
4342 "I<http://www.bsc.es/projects/deepcomputing/linuxoncell/> for the recommended "
4347 #: build/C/man2/spu_run.2:207
4349 "The following is an example of running a simple, one-instruction SPU program "
4350 "with the B<spu_run>() system call."
4354 #: build/C/man2/spu_run.2:215
4357 "#include E<lt>stdlib.hE<gt>\n"
4358 "#include E<lt>stdint.hE<gt>\n"
4359 "#include E<lt>unistd.hE<gt>\n"
4360 "#include E<lt>stdio.hE<gt>\n"
4361 "#include E<lt>sys/types.hE<gt>\n"
4362 "#include E<lt>fcntl.hE<gt>\n"
4366 #: build/C/man2/spu_run.2:218
4369 "#define handle_error(msg) \\e\n"
4370 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4374 #: build/C/man2/spu_run.2:223
4379 " int context, fd, spu_status;\n"
4380 " uint32_t instruction, npc;\n"
4384 #: build/C/man2/spu_run.2:227
4387 " context = spu_create(\"/spu/example-context\", 0, 0755);\n"
4388 " if (context == -1)\n"
4389 " handle_error(\"spu_create\");\n"
4393 #: build/C/man2/spu_run.2:232
4396 " /* write a \\(aqstop 0x1234\\(aq instruction to the SPU\\(aqs\n"
4397 " * local store memory\n"
4399 " instruction = 0x00001234;\n"
4403 #: build/C/man2/spu_run.2:237
4406 " fd = open(\"/spu/example-context/mem\", O_RDWR);\n"
4408 " handle_error(\"open\");\n"
4409 " write(fd, &instruction, sizeof(instruction));\n"
4413 #: build/C/man2/spu_run.2:243
4416 " /* set npc to the starting instruction address of the\n"
4417 " * SPU program. Since we wrote the instruction at the\n"
4418 " * start of the mem file, the entry point will be 0x0\n"
4424 #: build/C/man2/spu_run.2:247
4427 " spu_status = spu_run(context, &npc, NULL);\n"
4428 " if (spu_status == -1)\n"
4429 " handle_error(\"open\");\n"
4433 #: build/C/man2/spu_run.2:253
4436 " /* we should see a status code of 0x1234002:\n"
4437 " * 0x00000002 (spu was stopped due to stop-and-signal)\n"
4438 " * | 0x12340000 (the stop-and-signal code)\n"
4440 " printf(\"SPU Status: 0x%08x\\en\", spu_status);\n"
4444 #: build/C/man2/spu_run.2:256 build/C/man2/stat.2:637
4447 " exit(EXIT_SUCCESS);\n"
4452 #: build/C/man2/spu_run.2:264
4453 msgid "B<close>(2), B<spu_create>(2), B<capabilities>(7), B<spufs>(7)"
4457 #: build/C/man7/spufs.7:26
4463 #: build/C/man7/spufs.7:29
4464 msgid "spufs - SPU file system"
4468 #: build/C/man7/spufs.7:33
4470 "The SPU file system is used on PowerPC machines that implement the Cell "
4471 "Broadband Engine Architecture in order to access Synergistic Processor Units "
4476 #: build/C/man7/spufs.7:42
4478 "The file system provides a name space similar to POSIX shared memory or "
4479 "message queues. Users that have write permissions on the file system can "
4480 "use B<spu_create>(2) to establish SPU contexts under the B<spufs> root "
4485 #: build/C/man7/spufs.7:49
4487 "Every SPU context is represented by a directory containing a predefined set "
4488 "of files. These files can be used for manipulating the state of the logical "
4489 "SPU. Users can change permissions on the files, but can't add or remove "
4494 #: build/C/man7/spufs.7:49
4496 msgid "Mount Options"
4500 #: build/C/man7/spufs.7:50
4502 msgid "B<uid=E<lt>uidE<gt>>"
4506 #: build/C/man7/spufs.7:53
4507 msgid "Set the user owning the mount point; the default is 0 (root)."
4511 #: build/C/man7/spufs.7:53
4513 msgid "B<gid=E<lt>gidE<gt>>"
4517 #: build/C/man7/spufs.7:56
4518 msgid "Set the group owning the mount point; the default is 0 (root)."
4522 #: build/C/man7/spufs.7:56
4524 msgid "B<mode=E<lt>modeE<gt>>"
4528 #: build/C/man7/spufs.7:62
4530 "Set the mode of the top-level directory in B<spufs>, as an octal mode "
4531 "string. The default is 0775."
4535 #: build/C/man7/spufs.7:62
4541 #: build/C/man7/spufs.7:74
4543 "The files in B<spufs> mostly follow the standard behavior for regular system "
4544 "calls like B<read>(2) or B<write>(2), but often support only a subset of "
4545 "the operations supported on regular file systems. This list details the "
4546 "supported operations and the deviations from the standard behavior described "
4547 "in the respective man pages."
4551 #: build/C/man7/spufs.7:96
4553 "All files that support the B<read>(2) operation also support B<readv>(2) "
4554 "and all files that support the B<write>(2) operation also support "
4555 "B<writev>(2). All files support the B<access>(2) and B<stat>(2) family of "
4556 "operations, but for the latter call, the only fields of the returned I<stat> "
4557 "structure that contain reliable information are I<st_mode>, I<st_nlink>, "
4558 "I<st_uid>, and I<st_gid>."
4562 #: build/C/man7/spufs.7:105
4564 "All files support the B<chmod>(2)/B<fchmod>(2) and B<chown>(2)/B<fchown>(2) "
4565 "operations, but will not be able to grant permissions that contradict the "
4566 "possible operations (e.g., read access on the I<wbox> file)."
4570 #: build/C/man7/spufs.7:107
4571 msgid "The current set of files is:"
4575 #: build/C/man7/spufs.7:107
4577 msgid "I</capabilities>"
4581 #: build/C/man7/spufs.7:112
4583 "Contains a comma-delimited string representing the capabilities of this SPU "
4584 "context. Possible capabilities are:"
4588 #: build/C/man7/spufs.7:113
4594 #: build/C/man7/spufs.7:116
4595 msgid "This context may be scheduled."
4599 #: build/C/man7/spufs.7:116
4605 #: build/C/man7/spufs.7:119
4606 msgid "This context can be run in single-step mode, for debugging."
4610 #: build/C/man7/spufs.7:121
4611 msgid "New capabilities flags may be added in the future."
4615 #: build/C/man7/spufs.7:122
4621 #: build/C/man7/spufs.7:131
4623 "the contents of the local storage memory of the SPU. This can be accessed "
4624 "like a regular shared memory file and contains both code and data in the "
4625 "address space of the SPU. The possible operations on an open I<mem> file "
4630 #: build/C/man7/spufs.7:132
4632 msgid "B<read>(2), B<pread>(2), B<write>(2), B<pwrite>(2), B<lseek>(2)"
4636 #: build/C/man7/spufs.7:143
4638 "These operate as usual, with the exception that B<lseek>(2), B<write>(2), "
4639 "and B<pwrite>(2) are not supported beyond the end of the file. The file "
4640 "size is the size of the local storage of the SPU, which is normally 256 "
4645 #: build/C/man7/spufs.7:143 build/C/man7/spufs.7:705 build/C/man7/spufs.7:724
4651 #: build/C/man7/spufs.7:152
4653 "Mapping I<mem> into the process address space provides access to the SPU "
4654 "local storage within the process address space. Only B<MAP_SHARED> mappings "
4659 #: build/C/man7/spufs.7:153
4665 #: build/C/man7/spufs.7:160
4667 "Contains the saved general-purpose registers of the SPU context. This file "
4668 "contains the 128-bit values of each register, from register 0 to register "
4669 "127, in order. This allows the general-purpose registers to be inspected "
4674 #: build/C/man7/spufs.7:164
4676 "Reading to or writing from this file requires that the context is scheduled "
4677 "out, so use of this file is not recommended in normal program operation."
4681 #: build/C/man7/spufs.7:170
4683 "The I<regs> file is not present on contexts that have been created with the "
4684 "B<SPU_CREATE_NOSCHED> flag."
4688 #: build/C/man7/spufs.7:170
4694 #: build/C/man7/spufs.7:180
4696 "The first SPU-to-CPU communication mailbox. This file is read-only and can "
4697 "be read in units of 4 bytes. The file can only be used in nonblocking mode "
4698 "- even B<poll>(2) cannot be used to block on this file. The only possible "
4699 "operation on an open I<mbox> file is:"
4703 #: build/C/man7/spufs.7:181 build/C/man7/spufs.7:221 build/C/man7/spufs.7:316 build/C/man7/spufs.7:380 build/C/man7/spufs.7:417 build/C/man7/spufs.7:462 build/C/man7/spufs.7:516 build/C/man7/spufs.7:631 build/C/man7/spufs.7:675 build/C/man7/spufs.7:753
4709 #: build/C/man7/spufs.7:199
4711 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4712 "to B<EINVAL>. If there is no data available in the mailbox (i.e., the SPU "
4713 "has not sent a mailbox message), the return value is set to -1 and I<errno> "
4714 "is set to B<EAGAIN>. When data has been read successfully, four bytes are "
4715 "placed in the data buffer and the value four is returned."
4719 #: build/C/man7/spufs.7:200
4725 #: build/C/man7/spufs.7:216
4727 "The second SPU-to-CPU communication mailbox. This file is similar to the "
4728 "first mailbox file, but can be read in blocking I/O mode, thus calling "
4729 "B<read>(2) on an open I<ibox> file will block until the SPU has written "
4730 "data to its interrupt mailbox channel (unless the file has been opened with "
4731 "B<O_NONBLOCK>, see below). Also, B<poll>(2) and similar system calls can "
4732 "be used to monitor for the presence of mailbox data."
4736 #: build/C/man7/spufs.7:220
4737 msgid "The possible operations on an open I<ibox> file are:"
4741 #: build/C/man7/spufs.7:238
4743 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4744 "to B<EINVAL>. If there is no data available in the mailbox and the file "
4745 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4746 "and I<errno> is set to B<EAGAIN>."
4750 #: build/C/man7/spufs.7:246
4752 "If there is no data available in the mailbox and the file descriptor has "
4753 "been opened without B<O_NONBLOCK>, the call will block until the SPU writes "
4754 "to its interrupt mailbox channel. When data has been read successfully, "
4755 "four bytes are placed in the data buffer and the value four is returned."
4759 #: build/C/man7/spufs.7:246 build/C/man7/spufs.7:294 build/C/man7/spufs.7:684
4765 #: build/C/man7/spufs.7:253
4767 "Poll on the I<ibox> file returns I<(POLLIN | POLLRDNORM)> whenever data is "
4768 "available for reading."
4772 #: build/C/man7/spufs.7:254
4778 #: build/C/man7/spufs.7:266
4780 "The CPU-to-SPU communication mailbox. It is write-only and can be written "
4781 "in units of four bytes. If the mailbox is full, B<write>(2) will block, "
4782 "and B<poll>(2) can be used to block until the mailbox is available for "
4783 "writing again. The possible operations on an open I<wbox> file are:"
4787 #: build/C/man7/spufs.7:267 build/C/man7/spufs.7:391 build/C/man7/spufs.7:431 build/C/man7/spufs.7:475 build/C/man7/spufs.7:526 build/C/man7/spufs.7:637 build/C/man7/spufs.7:651 build/C/man7/spufs.7:748
4793 #: build/C/man7/spufs.7:285
4795 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
4796 "to B<EINVAL>. If there is no space available in the mailbox and the file "
4797 "descriptor has been opened with B<O_NONBLOCK>, the return value is set to -1 "
4798 "and I<errno> is set to B<EAGAIN>."
4802 #: build/C/man7/spufs.7:294
4804 "If there is no space available in the mailbox and the file descriptor has "
4805 "been opened without B<O_NONBLOCK>, the call will block until the SPU reads "
4806 "from its PPE (PowerPC Processing Element) mailbox channel. When data has "
4807 "been written successfully, the system call returns four as its function "
4812 #: build/C/man7/spufs.7:301
4814 "A poll on the I<wbox> file returns I<(POLLOUT | POLLWRNORM)> whenever space "
4815 "is available for writing."
4819 #: build/C/man7/spufs.7:302
4821 msgid "I</mbox_stat>, I</ibox_stat>, I</wbox_stat>"
4825 #: build/C/man7/spufs.7:315
4827 "These are read-only files that contain the length of the current queue of "
4828 "each mailbox, i.e., how many words can be read from I<mbox> or I<ibox> or "
4829 "how many words can be written to I<wbox> without blocking. The files can be "
4830 "read only in four-byte units and return a big-endian binary integer number. "
4831 "The only possible operation on an open I<*box_stat> file is:"
4835 #: build/C/man7/spufs.7:336
4837 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
4838 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer. "
4839 "This value is the number of elements that can be read from (for I<mbox_stat> "
4840 "and I<ibox_stat>) or written to (for I<wbox_stat>) the respective mailbox "
4841 "without blocking or returning an B<EAGAIN> error."
4845 #: build/C/man7/spufs.7:337
4848 "I</npc>, I</decr>, I</decr_status>, I</spu_tag_mask>, I</event_mask>, "
4849 "I</event_status>, I</srr0>, I</lslr>"
4853 #: build/C/man7/spufs.7:349
4855 "Internal registers of the SPU. These files contain an ASCII string "
4856 "representing the hex value of the specified register. Reads and writes on "
4857 "these files (except for I<npc>, see below) require that the SPU context be "
4858 "scheduled out, so frequent access to these files is not recommended for "
4859 "normal program operation."
4863 #: build/C/man7/spufs.7:351
4864 msgid "The contents of these files are:"
4868 #: build/C/man7/spufs.7:352
4874 #: build/C/man7/spufs.7:355
4875 msgid "Next Program Counter - only valid when the SPU is in a stopped state."
4879 #: build/C/man7/spufs.7:355
4885 #: build/C/man7/spufs.7:358
4886 msgid "SPU Decrementer"
4890 #: build/C/man7/spufs.7:358
4892 msgid "I<decr_status>"
4896 #: build/C/man7/spufs.7:361
4897 msgid "Decrementer Status"
4901 #: build/C/man7/spufs.7:361
4903 msgid "I<spu_tag_mask>"
4907 #: build/C/man7/spufs.7:364
4908 msgid "MFC tag mask for SPU DMA"
4912 #: build/C/man7/spufs.7:364
4914 msgid "I<event_mask>"
4918 #: build/C/man7/spufs.7:367
4919 msgid "Event mask for SPU interrupts"
4923 #: build/C/man7/spufs.7:367
4925 msgid "I<event_status>"
4929 #: build/C/man7/spufs.7:370
4930 msgid "Number of SPU events pending (read-only)"
4934 #: build/C/man7/spufs.7:370
4940 #: build/C/man7/spufs.7:373
4941 msgid "Interrupt Return address register"
4945 #: build/C/man7/spufs.7:373
4951 #: build/C/man7/spufs.7:376
4952 msgid "Local Store Limit Register"
4956 #: build/C/man7/spufs.7:379
4957 msgid "The possible operations on these files are:"
4961 #: build/C/man7/spufs.7:387
4963 "Reads the current register value. If the register value is larger than the "
4964 "buffer passed to the B<read>(2) system call, subsequent reads will continue "
4965 "reading from the same buffer, until the end of the buffer is reached."
4969 #: build/C/man7/spufs.7:391
4971 "When a complete string has been read, all subsequent read operations will "
4972 "return zero bytes and a new file descriptor needs to be opened to read a new "
4977 #: build/C/man7/spufs.7:401 build/C/man7/spufs.7:536
4979 "A B<write>(2) operation on the file sets the register to the value given in "
4980 "the string. The string is parsed from the beginning until the first "
4981 "nonnumeric character or the end of the buffer. Subsequent writes to the "
4982 "same file descriptor overwrite the previous setting."
4986 #: build/C/man7/spufs.7:408
4988 "Except for the I<npc> file, these files are not present on contexts that "
4989 "have been created with the B<SPU_CREATE_NOSCHED> flag."
4993 #: build/C/man7/spufs.7:409
4999 #: build/C/man7/spufs.7:416
5001 "This file provides access to the Floating Point Status and Control Register "
5002 "(fcpr) as a binary, four-byte file. The operations on the I<fpcr> file are:"
5006 #: build/C/man7/spufs.7:431
5008 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5009 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5010 "this is the current value of the I<fpcr> register."
5014 #: build/C/man7/spufs.7:445
5016 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5017 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5018 "updating the value of the I<fpcr> register."
5022 #: build/C/man7/spufs.7:446
5024 msgid "I</signal1>, I</signal2>"
5028 #: build/C/man7/spufs.7:461
5030 "The files provide access to the two signal notification channels of an SPU. "
5031 "These are read-write files that operate on four-byte words. Writing to one "
5032 "of these files triggers an interrupt on the SPU. The value written to the "
5033 "signal files can be read from the SPU through a channel read or from host "
5034 "user space through the file. After the value has been read by the SPU, it "
5035 "is reset to zero. The possible operations on an open I<signal1> or "
5036 "I<signal2> file are:"
5040 #: build/C/man7/spufs.7:475
5042 "If I<count> is smaller than four, B<read>(2) returns -1 and sets I<errno> "
5043 "to B<EINVAL>. Otherwise, a four-byte value is placed in the data buffer; "
5044 "this is the current value of the specified signal notification register."
5048 #: build/C/man7/spufs.7:496
5050 "If I<count> is smaller than four, B<write>(2) returns -1 and sets I<errno> "
5051 "to B<EINVAL>. Otherwise, a four-byte value is copied from the data buffer, "
5052 "updating the value of the specified signal notification register. The "
5053 "signal notification register will either be replaced with the input data or "
5054 "will be updated to the bitwise OR operation of the old value and the input "
5055 "data, depending on the contents of the I<signal1_type> or I<signal2_type> "
5056 "files respectively."
5060 #: build/C/man7/spufs.7:497
5062 msgid "I</signal1_type>, I</signal2_type>"
5066 #: build/C/man7/spufs.7:515
5068 "These two files change the behavior of the I<signal1> and I<signal2> "
5069 "notification files. They contain a numeric ASCII string which is read as "
5070 "either \"1\" or \"0\". In mode 0 (overwrite), the hardware replaces the "
5071 "contents of the signal channel with the data that is written to it. In mode "
5072 "1 (logical OR), the hardware accumulates the bits that are subsequently "
5073 "written to it. The possible operations on an open I<signal1_type> or "
5074 "I<signal2_type> file are:"
5078 #: build/C/man7/spufs.7:526
5080 "When the count supplied to the B<read>(2) call is shorter than the required "
5081 "length for the digit (plus a newline character), subsequent reads from the "
5082 "same file descriptor will complete the string. When a complete string has "
5083 "been read, all subsequent read operations will return zero bytes and a new "
5084 "file descriptor needs to be opened to read the value again."
5088 #: build/C/man7/spufs.7:537
5090 msgid "I</mbox_info>, I</ibox_info>, I</wbox_info>, I</dma_into>, I</proxydma_info>"
5094 #: build/C/man7/spufs.7:556
5096 "Read-only files that contain the saved state of the SPU mailboxes and DMA "
5097 "queues. This allows the SPU status to be inspected, mainly for debugging. "
5098 "The I<mbox_info> and I<ibox_info> files each contain the four-byte mailbox "
5099 "message that has been written by the SPU. If no message has been written to "
5100 "these mailboxes, then contents of these files is undefined. The "
5101 "I<mbox_stat>, I<ibox_stat> and I<wbox_stat> files contain the available "
5106 #: build/C/man7/spufs.7:565
5108 "The I<wbox_info> file contains an array of four-byte mailbox messages, which "
5109 "have been sent to the SPU. With current CBEA machines, the array is four "
5110 "items in length, so up to 4 * 4 = 16 bytes can be read from this file. If "
5111 "any mailbox queue entry is empty, then the bytes read at the corresponding "
5112 "location are undefined."
5116 #: build/C/man7/spufs.7:570
5118 "The I<dma_info> file contains the contents of the SPU MFC DMA queue, "
5119 "represented as the following structure:"
5123 #: build/C/man7/spufs.7:581
5126 "struct spu_dma_info {\n"
5127 " uint64_t dma_info_type;\n"
5128 " uint64_t dma_info_mask;\n"
5129 " uint64_t dma_info_status;\n"
5130 " uint64_t dma_info_stall_and_notify;\n"
5131 " uint64_t dma_info_atomic_command_status;\n"
5132 " struct mfc_cq_sr dma_info_command_data[16];\n"
5137 #: build/C/man7/spufs.7:589
5139 "The last member of this data structure is the actual DMA queue, containing "
5140 "16 entries. The I<mfc_cq_sr> structure is defined as:"
5144 #: build/C/man7/spufs.7:598
5147 "struct mfc_cq_sr {\n"
5148 " uint64_t mfc_cq_data0_RW;\n"
5149 " uint64_t mfc_cq_data1_RW;\n"
5150 " uint64_t mfc_cq_data2_RW;\n"
5151 " uint64_t mfc_cq_data3_RW;\n"
5156 #: build/C/man7/spufs.7:606
5158 "The I<proxydma_info> file contains similar information, but describes the "
5159 "proxy DMA queue (i.e., DMAs initiated by entities outside the SPU) instead. "
5160 "The file is in the following format:"
5164 #: build/C/man7/spufs.7:615
5167 "struct spu_proxydma_info {\n"
5168 " uint64_t proxydma_info_type;\n"
5169 " uint64_t proxydma_info_mask;\n"
5170 " uint64_t proxydma_info_status;\n"
5171 " struct mfc_cq_sr proxydma_info_command_data[8];\n"
5176 #: build/C/man7/spufs.7:621
5178 "Accessing these files requires that the SPU context is scheduled out - "
5179 "frequent use can be inefficient. These files should not be used for normal "
5180 "program operation."
5184 #: build/C/man7/spufs.7:625
5186 "These files are not present on contexts that have been created with the "
5187 "B<SPU_CREATE_NOSCHED> flag."
5191 #: build/C/man7/spufs.7:625
5197 #: build/C/man7/spufs.7:630
5199 "This file provides access to the SPU Run Control and SPU status registers, "
5200 "as an ASCII string. The following operations are supported:"
5204 #: build/C/man7/spufs.7:637
5206 "Reads from the I<cntl> file will return an ASCII string with the hex value "
5207 "of the SPU Status register."
5211 #: build/C/man7/spufs.7:642
5212 msgid "Writes to the I<cntl> file will set the context's SPU Run Control register."
5216 #: build/C/man7/spufs.7:643
5222 #: build/C/man7/spufs.7:650
5224 "Provides access to the Memory Flow Controller of the SPU. Reading from the "
5225 "file returns the contents of the SPU's MFC Tag Status register, and writing "
5226 "to the file initiates a DMA from the MFC. The following operations are "
5231 #: build/C/man7/spufs.7:655
5233 "Writes to this file need to be in the format of a MFC DMA command, defined "
5238 #: build/C/man7/spufs.7:667
5241 "struct mfc_dma_command {\n"
5242 " int32_t pad; /* reserved */\n"
5243 " uint32_t lsa; /* local storage address */\n"
5244 " uint64_t ea; /* effective address */\n"
5245 " uint16_t size; /* transfer size */\n"
5246 " uint16_t tag; /* command tag */\n"
5247 " uint16_t class; /* class ID */\n"
5248 " uint16_t cmd; /* command opcode */\n"
5253 #: build/C/man7/spufs.7:675
5255 "Writes are required to be exactly I<sizeof(struct mfc_dma_command)> bytes in "
5256 "size. The command will be sent to the SPU's MFC proxy queue, and the tag "
5257 "stored in the kernel (see below)."
5261 #: build/C/man7/spufs.7:684
5263 "Reads the contents of the tag status register. If the file is opened in "
5264 "blocking mode (i.e., without B<O_NONBLOCK>), then the read will block until "
5265 "a DMA tag (as performed by a previous write) is complete. In nonblocking "
5266 "mode, the MFC tag status register will be returned without waiting."
5270 #: build/C/man7/spufs.7:697
5272 "Calling B<poll>(2) on the I<mfc> file will block until a new DMA can be "
5273 "started (by checking for B<POLLOUT>) or until a previously started DMA (by "
5274 "checking for B<POLLIN>) has been completed."
5278 #: build/C/man7/spufs.7:703
5280 "I</mss> Provides access to the MFC MultiSource Synchronization (MSS) "
5281 "facility. By B<mmap>(2)-ing this file, processes can access the MSS area of "
5286 #: build/C/man7/spufs.7:705 build/C/man7/spufs.7:723
5287 msgid "The following operations are supported:"
5291 #: build/C/man7/spufs.7:714
5293 "Mapping B<mss> into the process address space gives access to the SPU MSS "
5294 "area within the process address space. Only B<MAP_SHARED> mappings are "
5299 #: build/C/man7/spufs.7:715
5305 #: build/C/man7/spufs.7:721
5307 "Provides access to the whole problem-state mapping of the SPU. Applications "
5308 "can use this area to interface to the SPU, rather than writing to individual "
5309 "register files in B<spufs>."
5313 #: build/C/man7/spufs.7:732
5315 "Mapping B<psmap> gives a process a direct map of the SPU problem state "
5316 "area. Only B<MAP_SHARED> mappings are supported."
5320 #: build/C/man7/spufs.7:733
5326 #: build/C/man7/spufs.7:739
5328 "Read-only file containing the physical SPU number that the SPU context is "
5329 "running on. When the context is not running, this file contains the string "
5334 #: build/C/man7/spufs.7:741
5335 msgid "The physical SPU number is given by an ASCII hex string."
5339 #: build/C/man7/spufs.7:741
5341 msgid "I</object-id>"
5345 #: build/C/man7/spufs.7:747
5347 "Allows applications to store (or retrieve) a single 64-bit ID into the "
5348 "context. This ID is later used by profiling tools to uniquely identify the "
5353 #: build/C/man7/spufs.7:753
5355 "By writing an ASCII hex value into this file, applications can set the "
5356 "object ID of the SPU context. Any previous value of the object ID is "
5361 #: build/C/man7/spufs.7:757
5363 "Reading this file gives an ASCII hex string representing the object ID for "
5368 #: build/C/man7/spufs.7:759
5370 msgid "I</etc/fstab> entry"
5374 #. Arnd Bergmann <arndb@de.ibm.com>, Mark Nutter <mnutter@us.ibm.com>,
5375 #. Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Jeremy Kerr <jk@ozlabs.org>
5377 #: build/C/man7/spufs.7:765
5378 msgid "none \t/spu \tspufs \tgid=spu \t0\t0"
5382 #: build/C/man7/spufs.7:771
5384 "B<close>(2), B<spu_create>(2), B<spu_run>(2), B<capabilities>(7), I<The Cell "
5385 "Broadband Engine Architecture (CBEA) specification>"
5389 #: build/C/man2/stat.2:40
5395 #: build/C/man2/stat.2:40
5401 #: build/C/man2/stat.2:43
5402 msgid "stat, fstat, lstat - get file status"
5406 #: build/C/man2/stat.2:45
5407 msgid "B<#include E<lt>sys/types.hE<gt>>"
5411 #: build/C/man2/stat.2:47
5412 msgid "B<#include E<lt>sys/stat.hE<gt>>"
5416 #: build/C/man2/stat.2:49
5417 msgid "B<#include E<lt>unistd.hE<gt>>"
5421 #: build/C/man2/stat.2:51
5422 msgid "B<int stat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5426 #: build/C/man2/stat.2:53
5427 msgid "B<int fstat(int >I<fd>B<, struct stat *>I<buf>B<);>"
5431 #: build/C/man2/stat.2:55
5432 msgid "B<int lstat(const char *>I<path>B<, struct stat *>I<buf>B<);>"
5436 #: build/C/man2/stat.2:64
5441 #: build/C/man2/stat.2:67
5443 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5444 "_XOPEN_SOURCE_EXTENDED"
5448 #: build/C/man2/stat.2:69
5449 msgid "|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5453 #: build/C/man2/stat.2:83
5455 "These functions return information about a file. No permissions are "
5456 "required on the file itself, but\\(emin the case of B<stat>() and "
5457 "B<lstat>() \\(em execute (search) permission is required on all of the "
5458 "directories in I<path> that lead to the file."
5462 #: build/C/man2/stat.2:89
5463 msgid "B<stat>() stats the file pointed to by I<path> and fills in I<buf>."
5467 #: build/C/man2/stat.2:97
5469 "B<lstat>() is identical to B<stat>(), except that if I<path> is a symbolic "
5470 "link, then the link itself is stat-ed, not the file that it refers to."
5474 #: build/C/man2/stat.2:103
5476 "B<fstat>() is identical to B<stat>(), except that the file to be stat-ed is "
5477 "specified by the file descriptor I<fd>."
5481 #: build/C/man2/stat.2:107
5483 "All of these system calls return a I<stat> structure, which contains the "
5488 #: build/C/man2/stat.2:125
5492 " dev_t st_dev; /* ID of device containing file */\n"
5493 " ino_t st_ino; /* inode number */\n"
5494 " mode_t st_mode; /* protection */\n"
5495 " nlink_t st_nlink; /* number of hard links */\n"
5496 " uid_t st_uid; /* user ID of owner */\n"
5497 " gid_t st_gid; /* group ID of owner */\n"
5498 " dev_t st_rdev; /* device ID (if special file) */\n"
5499 " off_t st_size; /* total size, in bytes */\n"
5500 " blksize_t st_blksize; /* blocksize for file system I/O */\n"
5501 " blkcnt_t st_blocks; /* number of 512B blocks allocated */\n"
5502 " time_t st_atime; /* time of last access */\n"
5503 " time_t st_mtime; /* time of last modification */\n"
5504 " time_t st_ctime; /* time of last status change */\n"
5509 #: build/C/man2/stat.2:136
5511 "The I<st_dev> field describes the device on which this file resides. (The "
5512 "B<major>(3) and B<minor>(3) macros may be useful to decompose the device "
5513 "ID in this field.)"
5517 #: build/C/man2/stat.2:140
5518 msgid "The I<st_rdev> field describes the device that this file (inode) represents."
5522 #: build/C/man2/stat.2:147
5524 "The I<st_size> field gives the size of the file (if it is a regular file or "
5525 "a symbolic link) in bytes. The size of a symbolic link is the length of the "
5526 "pathname it contains, without a terminating null byte."
5530 #: build/C/man2/stat.2:154
5532 "The I<st_blocks> field indicates the number of blocks allocated to the file, "
5533 "512-byte units. (This may be smaller than I<st_size>/512 when the file has "
5538 #: build/C/man2/stat.2:160
5540 "The I<st_blksize> field gives the \"preferred\" blocksize for efficient file "
5541 "system I/O. (Writing to a file in smaller chunks may cause an inefficient "
5542 "read-modify-rewrite.)"
5546 #: build/C/man2/stat.2:181
5548 "Not all of the Linux file systems implement all of the time fields. Some "
5549 "file system types allow mounting in such a way that file and/or directory "
5550 "accesses do not cause an update of the I<st_atime> field. (See I<noatime>, "
5551 "I<nodiratime>, and I<relatime> in B<mount>(8), and related information in "
5552 "B<mount>(2).) In addition, I<st_atime> is not updated if a file is opened "
5553 "with the B<O_NOATIME>; see B<open>(2)."
5557 #: build/C/man2/stat.2:196
5559 "The field I<st_atime> is changed by file accesses, for example, by "
5560 "B<execve>(2), B<mknod>(2), B<pipe>(2), B<utime>(2) and B<read>(2) (of more "
5561 "than zero bytes). Other routines, like B<mmap>(2), may or may not update "
5566 #: build/C/man2/stat.2:215
5568 "The field I<st_mtime> is changed by file modifications, for example, by "
5569 "B<mknod>(2), B<truncate>(2), B<utime>(2) and B<write>(2) (of more than "
5570 "zero bytes). Moreover, I<st_mtime> of a directory is changed by the "
5571 "creation or deletion of files in that directory. The I<st_mtime> field is "
5572 "I<not> changed for changes in owner, group, hard link count, or mode."
5576 #: build/C/man2/stat.2:220
5578 "The field I<st_ctime> is changed by writing or by setting inode information "
5579 "(i.e., owner, group, link count, mode, etc.)."
5583 #: build/C/man2/stat.2:224
5585 "The following POSIX macros are defined to check the file type using the "
5590 #: build/C/man2/stat.2:225
5592 msgid "B<S_ISREG>(m)"
5596 #: build/C/man2/stat.2:228
5597 msgid "is it a regular file?"
5601 #: build/C/man2/stat.2:228
5603 msgid "B<S_ISDIR>(m)"
5607 #: build/C/man2/stat.2:231
5612 #: build/C/man2/stat.2:231
5614 msgid "B<S_ISCHR>(m)"
5618 #: build/C/man2/stat.2:234
5619 msgid "character device?"
5623 #: build/C/man2/stat.2:234
5625 msgid "B<S_ISBLK>(m)"
5629 #: build/C/man2/stat.2:237
5630 msgid "block device?"
5634 #: build/C/man2/stat.2:237
5636 msgid "B<S_ISFIFO>(m)"
5640 #: build/C/man2/stat.2:240
5641 msgid "FIFO (named pipe)?"
5645 #: build/C/man2/stat.2:240
5647 msgid "B<S_ISLNK>(m)"
5651 #: build/C/man2/stat.2:243
5652 msgid "symbolic link? (Not in POSIX.1-1996.)"
5656 #: build/C/man2/stat.2:243
5658 msgid "B<S_ISSOCK>(m)"
5662 #: build/C/man2/stat.2:246
5663 msgid "socket? (Not in POSIX.1-1996.)"
5667 #: build/C/man2/stat.2:251
5668 msgid "The following flags are defined for the I<st_mode> field:"
5672 #: build/C/man2/stat.2:254
5674 msgid "S_IFMT\t0170000\tbit mask for the file type bit fields\n"
5678 #: build/C/man2/stat.2:255
5680 msgid "S_IFSOCK\t0140000\tsocket\n"
5684 #: build/C/man2/stat.2:256
5686 msgid "S_IFLNK\t0120000\tsymbolic link\n"
5690 #: build/C/man2/stat.2:257
5692 msgid "S_IFREG\t0100000\tregular file\n"
5696 #: build/C/man2/stat.2:258
5698 msgid "S_IFBLK\t0060000\tblock device\n"
5702 #: build/C/man2/stat.2:259
5704 msgid "S_IFDIR\t0040000\tdirectory\n"
5708 #: build/C/man2/stat.2:260
5710 msgid "S_IFCHR\t0020000\tcharacter device\n"
5714 #: build/C/man2/stat.2:261
5716 msgid "S_IFIFO\t0010000\tFIFO\n"
5720 #: build/C/man2/stat.2:262
5722 msgid "S_ISUID\t0004000\tset UID bit\n"
5726 #: build/C/man2/stat.2:263
5728 msgid "S_ISGID\t0002000\tset-group-ID bit (see below)\n"
5732 #: build/C/man2/stat.2:264
5734 msgid "S_ISVTX\t0001000\tsticky bit (see below)\n"
5738 #: build/C/man2/stat.2:265
5740 msgid "S_IRWXU\t00700\tmask for file owner permissions\n"
5744 #: build/C/man2/stat.2:266
5746 msgid "S_IRUSR\t00400\towner has read permission\n"
5750 #: build/C/man2/stat.2:267
5752 msgid "S_IWUSR\t00200\towner has write permission\n"
5756 #: build/C/man2/stat.2:268
5758 msgid "S_IXUSR\t00100\towner has execute permission\n"
5762 #: build/C/man2/stat.2:269
5764 msgid "S_IRWXG\t00070\tmask for group permissions\n"
5768 #: build/C/man2/stat.2:270
5770 msgid "S_IRGRP\t00040\tgroup has read permission\n"
5774 #: build/C/man2/stat.2:271
5776 msgid "S_IWGRP\t00020\tgroup has write permission\n"
5780 #: build/C/man2/stat.2:272
5782 msgid "S_IXGRP\t00010\tgroup has execute permission\n"
5786 #: build/C/man2/stat.2:273
5788 msgid "S_IRWXO\t00007\tmask for permissions for others (not in group)\n"
5792 #: build/C/man2/stat.2:274
5794 msgid "S_IROTH\t00004\tothers have read permission\n"
5798 #: build/C/man2/stat.2:275
5800 msgid "S_IWOTH\t00002\tothers have write permission\n"
5804 #: build/C/man2/stat.2:276
5806 msgid "S_IXOTH\t00001\tothers have execute permission\n"
5810 #: build/C/man2/stat.2:293
5812 "The set-group-ID bit (B<S_ISGID>) has several special uses. For a "
5813 "directory it indicates that BSD semantics is to be used for that directory: "
5814 "files created there inherit their group ID from the directory, not from the "
5815 "effective group ID of the creating process, and directories created there "
5816 "will also get the B<S_ISGID> bit set. For a file that does not have the "
5817 "group execution bit (B<S_IXGRP>) set, the set-group-ID bit indicates "
5818 "mandatory file/record locking."
5822 #: build/C/man2/stat.2:300
5824 "The sticky bit (B<S_ISVTX>) on a directory means that a file in that "
5825 "directory can be renamed or deleted only by the owner of the file, by the "
5826 "owner of the directory, and by a privileged process."
5830 #: build/C/man2/stat.2:313
5832 "Search permission is denied for one of the directories in the path prefix of "
5833 "I<path>. (See also B<path_resolution>(7).)"
5837 #: build/C/man2/stat.2:317
5838 msgid "I<fd> is bad."
5842 #: build/C/man2/stat.2:320
5843 msgid "Bad address."
5847 #: build/C/man2/stat.2:323
5848 msgid "Too many symbolic links encountered while traversing the path."
5852 #: build/C/man2/stat.2:327
5853 msgid "I<path> is too long."
5857 #: build/C/man2/stat.2:334
5858 msgid "A component of I<path> does not exist, or I<path> is an empty string."
5862 #: build/C/man2/stat.2:337
5863 msgid "Out of memory (i.e., kernel memory)."
5867 #: build/C/man2/stat.2:342
5868 msgid "A component of the path prefix of I<path> is not a directory."
5872 #: build/C/man2/stat.2:342 build/C/man2/statfs.2:185 build/C/man3/statvfs.3:152
5874 msgid "B<EOVERFLOW>"
5878 #: build/C/man2/stat.2:355
5880 "(B<stat>()) I<path> refers to a file whose size cannot be represented in "
5881 "the type I<off_t>. This can occur when an application compiled on a 32-bit "
5882 "platform without I<-D_FILE_OFFSET_BITS=64> calls B<stat>() on a file whose "
5883 "size exceeds I<(1E<lt>E<lt>31)-1> bits."
5886 #. SVr4 documents additional
5888 #. error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4
5889 #. documents additional
5893 #. error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
5895 #: build/C/man2/stat.2:365
5896 msgid "These system calls conform to SVr4, 4.3BSD, POSIX.1-2001."
5900 #: build/C/man2/stat.2:379
5902 "According to POSIX.1-2001, B<lstat>() on a symbolic link need return valid "
5903 "information only in the I<st_size> field and the file-type component of the "
5904 "I<st_mode> field of the I<stat> structure. POSIX.-2008 tightens the "
5905 "specification, requiring B<lstat>() to return valid information in all "
5906 "fields except the permission bits in I<st_mode>."
5910 #: build/C/man2/stat.2:399
5912 "Use of the I<st_blocks> and I<st_blksize> fields may be less portable. "
5913 "(They were introduced in BSD. The interpretation differs between systems, "
5914 "and possibly on a single system when NFS mounts are involved.) If you need "
5915 "to obtain the definition of the I<blkcnt_t> or I<blksize_t> types from "
5916 "I<E<lt>sys/stat.hE<gt>>, then define B<_XOPEN_SOURCE> with the value 500 or "
5917 "greater (before including I<any> header files)."
5921 #: build/C/man2/stat.2:417
5923 "POSIX.1-1990 did not describe the B<S_IFMT>, B<S_IFSOCK>, B<S_IFLNK>, "
5924 "B<S_IFREG>, B<S_IFBLK>, B<S_IFDIR>, B<S_IFCHR>, B<S_IFIFO>, B<S_ISVTX> "
5925 "constants, but instead demanded the use of the macros B<S_ISDIR>(), etc. "
5926 "The B<S_IF*> constants are present in POSIX.1-2011 and later."
5930 #: build/C/man2/stat.2:425
5932 "The B<S_ISLNK>() and B<S_ISSOCK>() macros are not in POSIX.1-1996, but "
5933 "both are present in POSIX.1-2001; the former is from SVID 4, the latter from "
5938 #: build/C/man2/stat.2:435
5940 "UNIX V7 (and later systems) had B<S_IREAD>, B<S_IWRITE>, B<S_IEXEC>, where "
5941 "POSIX prescribes the synonyms B<S_IRUSR>, B<S_IWUSR>, B<S_IXUSR>."
5945 #: build/C/man2/stat.2:435
5947 msgid "Other Systems"
5951 #: build/C/man2/stat.2:437
5952 msgid "Values that have been (or are) in use on various systems:"
5956 #: build/C/man2/stat.2:439
5958 msgid "hex\tname\tls\toctal\tdescription\n"
5962 #: build/C/man2/stat.2:440
5964 msgid "f000\tS_IFMT\t\t170000\tmask for file type\n"
5968 #: build/C/man2/stat.2:441
5970 msgid "0000\t\t\t000000\tSCO out-of-service inode; BSD unknown\n"
5974 #: build/C/man2/stat.2:442
5976 msgid "\t\t\t\ttype; SVID-v2 and XPG2 have both\n"
5980 #: build/C/man2/stat.2:443
5982 msgid "\t\t\t\t0 and 0100000 for ordinary file\n"
5986 #: build/C/man2/stat.2:444
5988 msgid "1000\tS_IFIFO\tp|\t010000\tFIFO (named pipe)\n"
5992 #: build/C/man2/stat.2:445
5994 msgid "2000\tS_IFCHR\tc\t020000\tcharacter special (V7)\n"
5998 #: build/C/man2/stat.2:446
6000 msgid "3000\tS_IFMPC\t\t030000\tmultiplexed character special (V7)\n"
6004 #: build/C/man2/stat.2:447
6006 msgid "4000\tS_IFDIR\td/\t040000\tdirectory (V7)\n"
6010 #: build/C/man2/stat.2:448
6012 msgid "5000\tS_IFNAM\t\t050000\tXENIX named special file\n"
6016 #: build/C/man2/stat.2:449
6018 msgid "\t\t\t\twith two subtypes, distinguished by\n"
6022 #: build/C/man2/stat.2:450
6024 msgid "\t\t\t\tI<st_rdev> values 1, 2\n"
6028 #: build/C/man2/stat.2:451
6030 msgid "0001\tS_INSEM\ts\t000001\tXENIX semaphore subtype of IFNAM\n"
6034 #: build/C/man2/stat.2:452
6036 msgid "0002\tS_INSHD\tm\t000002\tXENIX shared data subtype of IFNAM\n"
6040 #: build/C/man2/stat.2:453
6042 msgid "6000\tS_IFBLK\tb\t060000\tblock special (V7)\n"
6046 #: build/C/man2/stat.2:454
6048 msgid "7000\tS_IFMPB\t\t070000\tmultiplexed block special (V7)\n"
6052 #: build/C/man2/stat.2:455
6054 msgid "8000\tS_IFREG\t-\t100000\tregular (V7)\n"
6058 #: build/C/man2/stat.2:456
6060 msgid "9000\tS_IFCMP\t\t110000\tVxFS compressed\n"
6064 #: build/C/man2/stat.2:457
6066 msgid "9000\tS_IFNWK\tn\t110000\tnetwork special (HP-UX)\n"
6070 #: build/C/man2/stat.2:458
6072 msgid "a000\tS_IFLNK\tl@\t120000\tsymbolic link (BSD)\n"
6076 #: build/C/man2/stat.2:459
6078 msgid "b000\tS_IFSHAD\t\t130000\tSolaris shadow inode for ACL\n"
6082 #: build/C/man2/stat.2:460
6084 msgid "\t\t\t\t(not seen by userspace)\n"
6088 #: build/C/man2/stat.2:461
6090 msgid "c000\tS_IFSOCK\ts=\t140000\tsocket (BSD; also \"S_IFSOC\" on VxFS)\n"
6094 #: build/C/man2/stat.2:462
6096 msgid "d000\tS_IFDOOR\tDE<gt>\t150000\tSolaris door\n"
6100 #: build/C/man2/stat.2:463
6102 msgid "e000\tS_IFWHT\tw%\t160000\tBSD whiteout (not used for inode)\n"
6106 #: build/C/man2/stat.2:464
6108 msgid "0200\tS_ISVTX\t\t001000\tsticky bit: save swapped text even\n"
6112 #: build/C/man2/stat.2:465
6114 msgid "\t\t\t\tafter use (V7)\n"
6118 #: build/C/man2/stat.2:466
6120 msgid "\t\t\t\treserved (SVID-v2)\n"
6124 #: build/C/man2/stat.2:467
6126 msgid "\t\t\t\tOn nondirectories: don't cache this\n"
6130 #: build/C/man2/stat.2:468
6132 msgid "\t\t\t\tfile (SunOS)\n"
6136 #: build/C/man2/stat.2:469
6138 msgid "\t\t\t\tOn directories: restricted deletion\n"
6142 #: build/C/man2/stat.2:470
6144 msgid "\t\t\t\tflag (SVID-v4.2)\n"
6148 #: build/C/man2/stat.2:471
6150 msgid "0400\tS_ISGID\t\t002000\tset-group-ID on execution (V7)\n"
6154 #: build/C/man2/stat.2:472
6156 msgid "\t\t\t\tfor directories: use BSD semantics for\n"
6160 #: build/C/man2/stat.2:473
6162 msgid "\t\t\t\tpropagation of GID\n"
6166 #: build/C/man2/stat.2:474
6168 msgid "0400\tS_ENFMT\t\t002000\tSystem V file locking enforcement (shared\n"
6172 #: build/C/man2/stat.2:475
6174 msgid "\t\t\t\twith S_ISGID)\n"
6178 #: build/C/man2/stat.2:476
6180 msgid "0800\tS_ISUID\t\t004000\tset-user-ID on execution (V7)\n"
6184 #: build/C/man2/stat.2:477
6186 msgid "0800\tS_CDF\t\t004000\tdirectory is a context dependent\n"
6190 #: build/C/man2/stat.2:478
6192 msgid "\t\t\t\tfile (HP-UX)\n"
6196 #: build/C/man2/stat.2:482
6197 msgid "A sticky command appeared in Version 32V AT&T UNIX."
6200 #. As at kernel 2.6.25, XFS and JFS support nanosecond timestamps,
6201 #. but ext2, ext3, and Reiserfs do not.
6203 #: build/C/man2/stat.2:506
6205 "Since kernel 2.5.48, the I<stat> structure supports nanosecond resolution "
6206 "for the three file timestamp fields. Glibc exposes the nanosecond component "
6207 "of each field using names of the form I<st_atim.tv_nsec> if the "
6208 "B<_BSD_SOURCE> or B<_SVID_SOURCE> feature test macro is defined. These "
6209 "fields are specified in POSIX.1-2008, and, starting with version 2.12, glibc "
6210 "also exposes these field names if B<_POSIX_C_SOURCE> is defined with the "
6211 "value 200809L or greater, or B<_XOPEN_SOURCE> is defined with the value 700 "
6212 "or greater. If none of the aforementioned macros are defined, then the "
6213 "nanosecond values are exposed with names of the form I<st_atimensec>. On "
6214 "file systems that do not support subsecond timestamps, the nanosecond fields "
6215 "are returned with the value 0."
6219 #: build/C/man2/stat.2:513
6221 "On Linux, B<lstat>() will generally not trigger automounter action, whereas "
6222 "B<stat>() will (but see B<fstatat>(2))."
6226 #: build/C/man2/stat.2:521
6228 "For most files under the I</proc> directory, B<stat>() does not return the "
6229 "file size in the I<st_size> field; instead the field is returned with the "
6234 #: build/C/man2/stat.2:521
6236 msgid "Underlying kernel interface"
6240 #. A note from Andries Brouwer, July 2007
6242 #. > Is the story not rather more complicated for some calls like
6245 #. Yes and no, mostly no. See /usr/include/sys/stat.h .
6247 #. The idea is here not so much that syscalls change, but that
6248 #. the definitions of struct stat and of the types dev_t and mode_t change.
6249 #. This means that libc (even if it does not call the kernel
6250 #. but only calls some internal function) must know what the
6251 #. format of dev_t or of struct stat is.
6252 #. The communication between the application and libc goes via
6253 #. the include file <sys/stat.h> that defines a _STAT_VER and
6254 #. _MKNOD_VER describing the layout of the data that user space
6255 #. uses. Each (almost each) occurrence of stat() is replaced by
6256 #. an occurrence of xstat() where the first parameter of xstat()
6257 #. is this version number _STAT_VER.
6259 #. Now, also the definitions used by the kernel change.
6260 #. But glibc copes with this in the standard way, and the
6261 #. struct stat as returned by the kernel is repacked into
6262 #. the struct stat as expected by the application.
6263 #. Thus, _STAT_VER and this setup cater for the application-libc
6264 #. interface, rather than the libc-kernel interface.
6266 #. (Note that the details depend on gcc being used as c compiler.)
6268 #: build/C/man2/stat.2:573
6270 "Over time, increases in the size of the I<stat> structure have led to three "
6271 "successive versions of B<stat>(): I<sys_stat>() (slot I<__NR_oldstat>), "
6272 "I<sys_newstat>() (slot I<__NR_stat>), and I<sys_stat64()> (new in kernel "
6273 "2.4; slot I<__NR_stat64>). The glibc B<stat>() wrapper function hides "
6274 "these details from applications, invoking the most recent version of the "
6275 "system call provided by the kernel, and repacking the returned information "
6276 "if required for old binaries. Similar remarks apply for B<fstat>() and "
6281 #: build/C/man2/stat.2:579
6283 "The following program calls B<stat>() and displays selected fields in the "
6284 "returned I<stat> structure."
6288 #: build/C/man2/stat.2:586
6291 "#include E<lt>sys/types.hE<gt>\n"
6292 "#include E<lt>sys/stat.hE<gt>\n"
6293 "#include E<lt>time.hE<gt>\n"
6294 "#include E<lt>stdio.hE<gt>\n"
6295 "#include E<lt>stdlib.hE<gt>\n"
6299 #: build/C/man2/stat.2:591
6303 "main(int argc, char *argv[])\n"
6305 " struct stat sb;\n"
6309 #: build/C/man2/stat.2:596
6312 " if (argc != 2) {\n"
6313 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
6314 " exit(EXIT_FAILURE);\n"
6319 #: build/C/man2/stat.2:601
6322 " if (stat(argv[1], &sb) == -1) {\n"
6323 " perror(\"stat\");\n"
6324 " exit(EXIT_FAILURE);\n"
6329 #: build/C/man2/stat.2:603
6331 msgid " printf(\"File type: \");\n"
6335 #: build/C/man2/stat.2:614
6338 " switch (sb.st_mode & S_IFMT) {\n"
6339 " case S_IFBLK: printf(\"block device\\en\"); break;\n"
6340 " case S_IFCHR: printf(\"character device\\en\"); break;\n"
6341 " case S_IFDIR: printf(\"directory\\en\"); break;\n"
6342 " case S_IFIFO: printf(\"FIFO/pipe\\en\"); break;\n"
6343 " case S_IFLNK: printf(\"symlink\\en\"); break;\n"
6344 " case S_IFREG: printf(\"regular file\\en\"); break;\n"
6345 " case S_IFSOCK: printf(\"socket\\en\"); break;\n"
6346 " default: printf(\"unknown?\\en\"); break;\n"
6351 #: build/C/man2/stat.2:616
6353 msgid " printf(\"I-node number: %ld\\en\", (long) sb.st_ino);\n"
6357 #: build/C/man2/stat.2:619
6360 " printf(\"Mode: %lo (octal)\\en\",\n"
6361 " (unsigned long) sb.st_mode);\n"
6365 #: build/C/man2/stat.2:623
6368 " printf(\"Link count: %ld\\en\", (long) sb.st_nlink);\n"
6369 " printf(\"Ownership: UID=%ld GID=%ld\\en\",\n"
6370 " (long) sb.st_uid, (long) sb.st_gid);\n"
6374 #: build/C/man2/stat.2:630
6377 " printf(\"Preferred I/O block size: %ld bytes\\en\",\n"
6378 " (long) sb.st_blksize);\n"
6379 " printf(\"File size: %lld bytes\\en\",\n"
6380 " (long long) sb.st_size);\n"
6381 " printf(\"Blocks allocated: %lld\\en\",\n"
6382 " (long long) sb.st_blocks);\n"
6386 #: build/C/man2/stat.2:634
6389 " printf(\"Last status change: %s\", ctime(&sb.st_ctime));\n"
6390 " printf(\"Last file access: %s\", ctime(&sb.st_atime));\n"
6391 " printf(\"Last file modification: %s\", ctime(&sb.st_mtime));\n"
6395 #: build/C/man2/stat.2:647
6397 "B<access>(2), B<chmod>(2), B<chown>(2), B<fstatat>(2), B<readlink>(2), "
6398 "B<utime>(2), B<capabilities>(7), B<symlink>(7)"
6402 #: build/C/man2/statfs.2:26
6408 #: build/C/man2/statfs.2:26
6414 #: build/C/man2/statfs.2:29
6415 msgid "statfs, fstatfs - get file system statistics"
6419 #: build/C/man2/statfs.2:31
6420 msgid "B<#include E<lt>sys/vfs.hE<gt> >/* or E<lt>sys/statfs.hE<gt> */"
6424 #: build/C/man2/statfs.2:33
6425 msgid "B<int statfs(const char *>I<path>B<, struct statfs *>I<buf>B<);>"
6429 #: build/C/man2/statfs.2:35
6430 msgid "B<int fstatfs(int >I<fd>B<, struct statfs *>I<buf>B<);>"
6434 #: build/C/man2/statfs.2:45
6436 "The function B<statfs>() returns information about a mounted file system. "
6437 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6438 "is a pointer to a I<statfs> structure defined approximately as follows:"
6442 #: build/C/man2/statfs.2:53
6445 "#if __WORDSIZE == 32\t\t/* System word size */\n"
6446 "# define __SWORD_TYPE int\n"
6447 "#else /* __WORDSIZE == 64 */\n"
6448 "# define __SWORD_TYPE\t\tlong int\n"
6453 #: build/C/man2/statfs.2:68
6457 " __SWORD_TYPE f_type; /* type of file system (see below) */\n"
6458 " __SWORD_TYPE f_bsize; /* optimal transfer block size */\n"
6459 " fsblkcnt_t f_blocks; /* total data blocks in file system */\n"
6460 " fsblkcnt_t f_bfree; /* free blocks in fs */\n"
6461 " fsblkcnt_t f_bavail; /* free blocks available to\n"
6462 " unprivileged user */\n"
6463 " fsfilcnt_t f_files; /* total file nodes in file system */\n"
6464 " fsfilcnt_t f_ffree; /* free file nodes in fs */\n"
6465 " fsid_t f_fsid; /* file system id */\n"
6466 " __SWORD_TYPE f_namelen; /* maximum length of filenames */\n"
6467 " __SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */\n"
6468 " __SWORD_TYPE f_spare[5];\n"
6473 #: build/C/man2/statfs.2:70
6475 msgid "File system types:\n"
6479 #: build/C/man2/statfs.2:116
6482 " ADFS_SUPER_MAGIC 0xadf5\n"
6483 " AFFS_SUPER_MAGIC 0xADFF\n"
6484 " BEFS_SUPER_MAGIC 0x42465331\n"
6485 " BFS_MAGIC 0x1BADFACE\n"
6486 " CIFS_MAGIC_NUMBER 0xFF534D42\n"
6487 " CODA_SUPER_MAGIC 0x73757245\n"
6488 " COH_SUPER_MAGIC 0x012FF7B7\n"
6489 " CRAMFS_MAGIC 0x28cd3d45\n"
6490 " DEVFS_SUPER_MAGIC 0x1373\n"
6491 " EFS_SUPER_MAGIC 0x00414A53\n"
6492 " EXT_SUPER_MAGIC 0x137D\n"
6493 " EXT2_OLD_SUPER_MAGIC 0xEF51\n"
6494 " EXT2_SUPER_MAGIC 0xEF53\n"
6495 " EXT3_SUPER_MAGIC 0xEF53\n"
6496 " EXT4_SUPER_MAGIC 0xEF53\n"
6497 " HFS_SUPER_MAGIC 0x4244\n"
6498 " HPFS_SUPER_MAGIC 0xF995E849\n"
6499 " HUGETLBFS_MAGIC 0x958458f6\n"
6500 " ISOFS_SUPER_MAGIC 0x9660\n"
6501 " JFFS2_SUPER_MAGIC 0x72b6\n"
6502 " JFS_SUPER_MAGIC 0x3153464a\n"
6503 " MINIX_SUPER_MAGIC 0x137F /* orig. minix */\n"
6504 " MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */\n"
6505 " MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */\n"
6506 " MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */\n"
6507 " MSDOS_SUPER_MAGIC 0x4d44\n"
6508 " NCP_SUPER_MAGIC 0x564c\n"
6509 " NFS_SUPER_MAGIC 0x6969\n"
6510 " NTFS_SB_MAGIC 0x5346544e\n"
6511 " OPENPROM_SUPER_MAGIC 0x9fa1\n"
6512 " PROC_SUPER_MAGIC 0x9fa0\n"
6513 " QNX4_SUPER_MAGIC 0x002f\n"
6514 " REISERFS_SUPER_MAGIC 0x52654973\n"
6515 " ROMFS_MAGIC 0x7275\n"
6516 " SMB_SUPER_MAGIC 0x517B\n"
6517 " SYSV2_SUPER_MAGIC 0x012FF7B6\n"
6518 " SYSV4_SUPER_MAGIC 0x012FF7B5\n"
6519 " TMPFS_MAGIC 0x01021994\n"
6520 " UDF_SUPER_MAGIC 0x15013346\n"
6521 " UFS_MAGIC 0x00011954\n"
6522 " USBDEVICE_SUPER_MAGIC 0x9fa2\n"
6523 " VXFS_SUPER_MAGIC 0xa501FCF5\n"
6524 " XENIX_SUPER_MAGIC 0x012FF7B4\n"
6525 " XFS_SUPER_MAGIC 0x58465342\n"
6526 " _XIAFS_SUPER_MAGIC 0x012FD16D\n"
6530 #: build/C/man2/statfs.2:122
6531 msgid "Nobody knows what I<f_fsid> is supposed to contain (but see below)."
6535 #: build/C/man2/statfs.2:127
6537 "Fields that are undefined for a particular file system are set to 0. "
6538 "B<fstatfs>() returns the same information about an open file referenced by "
6543 #: build/C/man2/statfs.2:140
6545 "(B<statfs>()) Search permission is denied for a component of the path "
6546 "prefix of I<path>. (See also B<path_resolution>(7).)"
6550 #: build/C/man2/statfs.2:145
6551 msgid "(B<fstatfs>()) I<fd> is not a valid open file descriptor."
6555 #: build/C/man2/statfs.2:151
6556 msgid "I<buf> or I<path> points to an invalid address."
6560 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6561 msgid "This call was interrupted by a signal."
6565 #: build/C/man2/statfs.2:154 build/C/man3/statvfs.3:121
6571 #: build/C/man2/statfs.2:157 build/C/man3/statvfs.3:124
6572 msgid "An I/O error occurred while reading from the file system."
6576 #: build/C/man2/statfs.2:162
6578 "(B<statfs>()) Too many symbolic links were encountered in translating "
6583 #: build/C/man2/statfs.2:167
6584 msgid "(B<statfs>()) I<path> is too long."
6588 #: build/C/man2/statfs.2:173
6589 msgid "(B<statfs>()) The file referred to by I<path> does not exist."
6593 #: build/C/man2/statfs.2:176 build/C/man3/statvfs.3:143
6594 msgid "Insufficient kernel memory was available."
6598 #: build/C/man2/statfs.2:179 build/C/man3/statvfs.3:146
6599 msgid "The file system does not support this call."
6603 #: build/C/man2/statfs.2:185
6604 msgid "(B<statfs>()) A component of the path prefix of I<path> is not a directory."
6608 #: build/C/man2/statfs.2:188 build/C/man3/statvfs.3:155
6609 msgid "Some values were too large to be represented in the returned struct."
6613 #: build/C/man2/statfs.2:194
6615 "Linux-specific. The Linux B<statfs>() was inspired by the 4.4BSD one (but "
6616 "they do not use the same structure)."
6620 #: build/C/man2/statfs.2:216
6622 "The original Linux B<statfs>() and B<fstatfs>() system calls were not "
6623 "designed with extremely large file sizes in mind. Subsequently, Linux 2.6 "
6624 "added new B<statfs64>() and B<fstatfs64>() system calls that employ a new "
6625 "structure, I<statfs64>. The new structure contains the same fields as the "
6626 "original I<statfs> structure, but the sizes of various fields are increased, "
6627 "to accommodate large file sizes. The glibc B<statfs>() and B<fstatfs>() "
6628 "wrapper functions transparently deal with the kernel differences."
6632 #: build/C/man2/statfs.2:221
6634 "Some systems only have I<E<lt>sys/vfs.hE<gt>>, other systems also have "
6635 "I<E<lt>sys/statfs.hE<gt>>, where the former includes the latter. So it "
6636 "seems including the former is the best choice."
6640 #: build/C/man2/statfs.2:231
6642 "LSB has deprecated the library calls B<statfs>() and B<fstatfs>() and "
6643 "tells us to use B<statvfs>(2) and B<fstatvfs>(2) instead."
6647 #: build/C/man2/statfs.2:231
6649 msgid "The f_fsid field"
6653 #: build/C/man2/statfs.2:256
6655 "Solaris, Irix and POSIX have a system call B<statvfs>(2) that returns a "
6656 "I<struct statvfs> (defined in I<E<lt>sys/statvfs.hE<gt>>) containing an "
6657 "I<unsigned long> I<f_fsid>. Linux, SunOS, HP-UX, 4.4BSD have a system call "
6658 "B<statfs>() that returns a I<struct statfs> (defined in "
6659 "I<E<lt>sys/vfs.hE<gt>>) containing a I<fsid_t> I<f_fsid>, where I<fsid_t> "
6660 "is defined as I<struct { int val[2]; }>. The same holds for FreeBSD, except "
6661 "that it uses the include file I<E<lt>sys/mount.hE<gt>>."
6665 #: build/C/man2/statfs.2:269
6667 "The general idea is that I<f_fsid> contains some random stuff such that the "
6668 "pair (I<f_fsid>,I<ino>) uniquely determines a file. Some operating systems "
6669 "use (a variation on) the device number, or the device number combined with "
6670 "the file-system type. Several OSes restrict giving out the I<f_fsid> field "
6671 "to the superuser only (and zero it for unprivileged users), because this "
6672 "field is used in the filehandle of the file system when NFS-exported, and "
6673 "giving it out is a security concern."
6677 #: build/C/man2/statfs.2:275
6679 "Under some operating systems the I<fsid> can be used as second argument to "
6680 "the B<sysfs>(2) system call."
6684 #: build/C/man2/statfs.2:279
6685 msgid "B<stat>(2), B<statvfs>(2), B<path_resolution>(7)"
6689 #: build/C/man3/statvfs.3:28
6695 #: build/C/man3/statvfs.3:28
6701 #: build/C/man3/statvfs.3:31
6702 msgid "statvfs, fstatvfs - get file system statistics"
6706 #: build/C/man3/statvfs.3:33
6707 msgid "B<#include E<lt>sys/statvfs.hE<gt>>"
6711 #: build/C/man3/statvfs.3:35
6712 msgid "B<int statvfs(const char *>I<path>B<, struct statvfs *>I<buf>B<);>"
6716 #: build/C/man3/statvfs.3:37
6717 msgid "B<int fstatvfs(int >I<fd>B<, struct statvfs *>I<buf>B<);>"
6721 #: build/C/man3/statvfs.3:47
6723 "The function B<statvfs>() returns information about a mounted file system. "
6724 "I<path> is the pathname of any file within the mounted file system. I<buf> "
6725 "is a pointer to a I<statvfs> structure defined approximately as follows:"
6729 #: build/C/man3/statvfs.3:63
6732 "struct statvfs {\n"
6733 " unsigned long f_bsize; /* file system block size */\n"
6734 " unsigned long f_frsize; /* fragment size */\n"
6735 " fsblkcnt_t f_blocks; /* size of fs in f_frsize units */\n"
6736 " fsblkcnt_t f_bfree; /* # free blocks */\n"
6737 " fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */\n"
6738 " fsfilcnt_t f_files; /* # inodes */\n"
6739 " fsfilcnt_t f_ffree; /* # free inodes */\n"
6740 " fsfilcnt_t f_favail; /* # free inodes for unprivileged users */\n"
6741 " unsigned long f_fsid; /* file system ID */\n"
6742 " unsigned long f_flag; /* mount flags */\n"
6743 " unsigned long f_namemax; /* maximum filename length */\n"
6748 #: build/C/man3/statvfs.3:74
6750 "Here the types I<fsblkcnt_t> and I<fsfilcnt_t> are defined in "
6751 "I<E<lt>sys/types.hE<gt>>. Both used to be I<unsigned long>."
6755 #: build/C/man3/statvfs.3:80
6757 "The field I<f_flag> is a bit mask (of mount flags, see B<mount>(8)). Bits "
6758 "defined by POSIX are"
6762 #: build/C/man3/statvfs.3:80
6764 msgid "B<ST_RDONLY>"
6768 #: build/C/man3/statvfs.3:83
6769 msgid "Read-only file system."
6773 #: build/C/man3/statvfs.3:83
6775 msgid "B<ST_NOSUID>"
6779 #: build/C/man3/statvfs.3:87
6780 msgid "Set-user-ID/set-group-ID bits are ignored by B<exec>(3)."
6784 #: build/C/man3/statvfs.3:90
6786 "It is unspecified whether all members of the returned struct have meaningful "
6787 "values on all file systems."
6791 #: build/C/man3/statvfs.3:94
6793 "B<fstatvfs>() returns the same information about an open file referenced by "
6798 #: build/C/man3/statvfs.3:107
6800 "(B<statvfs>()) Search permission is denied for a component of the path "
6801 "prefix of I<path>. (See also B<path_resolution>(7).)"
6805 #: build/C/man3/statvfs.3:112
6806 msgid "(B<fstatvfs>()) I<fd> is not a valid open file descriptor."
6810 #: build/C/man3/statvfs.3:118
6811 msgid "I<Buf> or I<path> points to an invalid address."
6815 #: build/C/man3/statvfs.3:129
6817 "(B<statvfs>()) Too many symbolic links were encountered in translating "
6822 #: build/C/man3/statvfs.3:134
6823 msgid "(B<statvfs>()) I<path> is too long."
6827 #: build/C/man3/statvfs.3:140
6828 msgid "(B<statvfs>()) The file referred to by I<path> does not exist."
6832 #: build/C/man3/statvfs.3:152
6834 "(B<statvfs>()) A component of the path prefix of I<path> is not a "
6839 #: build/C/man3/statvfs.3:157
6840 msgid "POSIX.1-2001."
6844 #: build/C/man3/statvfs.3:163
6846 "The Linux kernel has system calls B<statfs>(2) and B<fstatfs>(2) to "
6847 "support this library call."
6851 #: build/C/man3/statvfs.3:165
6852 msgid "The current glibc implementations of"
6856 #: build/C/man3/statvfs.3:170
6859 " pathconf(path, _PC_REC_XFER_ALIGN);\n"
6860 " pathconf(path, _PC_ALLOC_SIZE_MIN);\n"
6861 " pathconf(path, _PC_REC_MIN_XFER_SIZE);\n"
6865 #: build/C/man3/statvfs.3:179
6867 "respectively use the I<f_frsize>, I<f_frsize>, and I<f_bsize> fields of the "
6868 "return value of I<statvfs(path,buf)>."
6872 #: build/C/man3/statvfs.3:181
6873 msgid "B<statfs>(2)"
6877 #: build/C/man2/sysfs.2:25
6883 #: build/C/man2/sysfs.2:25
6889 #: build/C/man2/sysfs.2:28
6890 msgid "sysfs - get file system type information"
6894 #: build/C/man2/sysfs.2:30
6895 msgid "B<int sysfs(int >I<option>B<, const char *>I<fsname>B<);>"
6899 #: build/C/man2/sysfs.2:32
6901 "B<int sysfs(int >I<option>B<, unsigned int >I<fs_index>B<, char "
6906 #: build/C/man2/sysfs.2:34
6907 msgid "B<int sysfs(int >I<option>B<);>"
6911 #: build/C/man2/sysfs.2:43
6913 "B<sysfs>() returns information about the file system types currently "
6914 "present in the kernel. The specific form of the B<sysfs>() call and the "
6915 "information returned depends on the I<option> in effect:"
6919 #: build/C/man2/sysfs.2:43
6925 #: build/C/man2/sysfs.2:48
6927 "Translate the file-system identifier string I<fsname> into a file-system "
6932 #: build/C/man2/sysfs.2:48
6938 #: build/C/man2/sysfs.2:59
6940 "Translate the file-system type index I<fs_index> into a null-terminated "
6941 "file-system identifier string. This string will be written to the buffer "
6942 "pointed to by I<buf>. Make sure that I<buf> has enough space to accept the "
6947 #: build/C/man2/sysfs.2:59
6953 #: build/C/man2/sysfs.2:63
6955 "Return the total number of file system types currently present in the "
6960 #: build/C/man2/sysfs.2:65
6961 msgid "The numbering of the file-system type indexes begins with zero."
6965 #: build/C/man2/sysfs.2:77
6967 "On success, B<sysfs>() returns the file-system index for option B<1>, zero "
6968 "for option B<2>, and the number of currently configured file systems for "
6969 "option B<3>. On error, -1 is returned, and I<errno> is set appropriately."
6973 #: build/C/man2/sysfs.2:82
6974 msgid "Either I<fsname> or I<buf> is outside your accessible address space."
6978 #: build/C/man2/sysfs.2:90
6980 "I<fsname> is not a valid file-system type identifier; I<fs_index> is "
6981 "out-of-bounds; I<option> is invalid."
6984 #. SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
6985 #. but has no ENOSYS condition.
6987 #: build/C/man2/sysfs.2:92 build/C/man2/ustat.2:94
6992 #: build/C/man2/sysfs.2:99
6994 "This System-V derived system call is obsolete; don't use it. On systems "
6995 "with I</proc>, the same information can be obtained via "
6996 "I</proc/filesystems>; use that interface instead."
7000 #: build/C/man2/sysfs.2:99
7006 #: build/C/man2/sysfs.2:102
7008 "There is no libc or glibc support. There is no way to guess how large "
7013 #: build/C/man2/umount.2:30
7019 #: build/C/man2/umount.2:30
7025 #: build/C/man2/umount.2:33
7026 msgid "umount, umount2 - unmount file system"
7030 #: build/C/man2/umount.2:38
7032 msgid "B<int umount(const char *>I<target>B<);>\n"
7036 #: build/C/man2/umount.2:40
7038 msgid "B<int umount2(const char *>I<target>B<, int >I<flags>B<);>\n"
7041 #. Note: the kernel naming differs from the glibc naming
7042 #. umount2 is the glibc name for what the kernel now calls umount
7043 #. and umount is the glibc name for oldumount
7045 #: build/C/man2/umount.2:50
7047 "B<umount>() and B<umount2>() remove the attachment of the (topmost) file "
7048 "system mounted on I<target>."
7052 #: build/C/man2/umount.2:54
7054 "Appropriate privilege (Linux: the B<CAP_SYS_ADMIN> capability) is required "
7055 "to unmount file systems."
7059 #: build/C/man2/umount.2:62
7061 "Linux 2.1.116 added the B<umount2>() system call, which, like B<umount>(), "
7062 "unmounts a target, but allows additional I<flags> controlling the behavior "
7067 #: build/C/man2/umount.2:62
7069 msgid "B<MNT_FORCE> (since Linux 2.1.116)"
7073 #: build/C/man2/umount.2:67
7075 "Force unmount even if busy. This can cause data loss. (Only for NFS "
7080 #: build/C/man2/umount.2:67
7082 msgid "B<MNT_DETACH> (since Linux 2.4.11)"
7086 #: build/C/man2/umount.2:72
7088 "Perform a lazy unmount: make the mount point unavailable for new accesses, "
7089 "and actually perform the unmount when the mount point ceases to be busy."
7093 #: build/C/man2/umount.2:72
7095 msgid "B<MNT_EXPIRE> (since Linux 2.6.8)"
7099 #: build/C/man2/umount.2:91
7101 "Mark the mount point as expired. If a mount point is not currently in use, "
7102 "then an initial call to B<umount2>() with this flag fails with the error "
7103 "B<EAGAIN>, but marks the mount point as expired. The mount point remains "
7104 "expired as long as it isn't accessed by any process. A second B<umount2>() "
7105 "call specifying B<MNT_EXPIRE> unmounts an expired mount point. This flag "
7106 "cannot be specified with either B<MNT_FORCE> or B<MNT_DETACH>."
7110 #: build/C/man2/umount.2:91
7112 msgid "B<UMOUNT_NOFOLLOW> (since Linux 2.6.34)"
7115 #. Later added to 2.6.33-stable
7117 #: build/C/man2/umount.2:99
7119 "Don't dereference I<target> if it is a symbolic link. This flag allows "
7120 "security problems to be avoided in set-user-ID-I<root> programs that allow "
7121 "unprivileged users to unmount file systems."
7125 #: build/C/man2/umount.2:110
7127 "The error values given below result from file-system type independent "
7128 "errors. Each file system type may have its own special errors and its own "
7129 "special behavior. See the kernel source code for details."
7133 #: build/C/man2/umount.2:110
7139 #: build/C/man2/umount.2:117
7141 "A call to B<umount2>() specifying B<MNT_EXPIRE> successfully marked an "
7142 "unbusy file system as expired."
7146 #: build/C/man2/umount.2:121
7147 msgid "I<target> could not be unmounted because it is busy."
7151 #: build/C/man2/umount.2:125
7152 msgid "I<target> points outside the user address space."
7156 #: build/C/man2/umount.2:137
7158 "I<target> is not a mount point. Or, B<umount2>() was called with "
7159 "B<MNT_EXPIRE> and either B<MNT_DETACH> or B<MNT_FORCE>."
7162 #. http://sourceware.org/bugzilla/show_bug.cgi?id=10092
7164 #: build/C/man2/umount.2:156
7166 "B<MNT_DETACH> and B<MNT_EXPIRE> are only available in glibc since version "
7171 #: build/C/man2/umount.2:159
7173 "These functions are Linux-specific and should not be used in programs "
7174 "intended to be portable."
7178 #: build/C/man2/umount.2:170
7180 "The original B<umount>() function was called as I<umount(device)> and would "
7181 "return B<ENOTBLK> when called with something other than a block device. In "
7182 "Linux 0.98p4 a call I<umount(dir)> was added, in order to support anonymous "
7183 "devices. In Linux 2.3.99-pre7 the call I<umount(device)> was removed, "
7184 "leaving only I<umount(dir)> (since now devices can be mounted in more than "
7185 "one place, so specifying the device does not suffice)."
7189 #: build/C/man2/umount.2:175
7190 msgid "B<mount>(2), B<path_resolution>(7), B<mount>(8), B<umount>(8)"
7194 #: build/C/man2/ustat.2:28
7200 #: build/C/man2/ustat.2:28
7206 #: build/C/man2/ustat.2:31
7207 msgid "ustat - get file system statistics"
7211 #: build/C/man2/ustat.2:34
7213 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
7217 #: build/C/man2/ustat.2:36
7219 msgid "B<#include E<lt>unistd.hE<gt>> /* libc[45] */\n"
7223 #: build/C/man2/ustat.2:38
7225 msgid "B<#include E<lt>ustat.hE<gt>> /* glibc2 */\n"
7229 #: build/C/man2/ustat.2:40
7231 msgid "B<int ustat(dev_t >I<dev>B<, struct ustat *>I<ubuf>B<);>\n"
7235 #: build/C/man2/ustat.2:50
7237 "B<ustat>() returns information about a mounted file system. I<dev> is a "
7238 "device number identifying a device containing a mounted file system. "
7239 "I<ubuf> is a pointer to a I<ustat> structure that contains the following "
7244 #: build/C/man2/ustat.2:57
7247 "daddr_t f_tfree; /* Total free blocks */\n"
7248 "ino_t f_tinode; /* Number of free inodes */\n"
7249 "char f_fname[6]; /* Filsys name */\n"
7250 "char f_fpack[6]; /* Filsys pack name */\n"
7254 #: build/C/man2/ustat.2:66
7256 "The last two fields, I<f_fname> and I<f_fpack>, are not implemented and will "
7257 "always be filled with null bytes (\\(aq\\e0\\(aq)."
7261 #: build/C/man2/ustat.2:75
7263 "On success, zero is returned and the I<ustat> structure pointed to by "
7264 "I<ubuf> will be filled in. On error, -1 is returned, and I<errno> is set "
7269 #: build/C/man2/ustat.2:80
7270 msgid "I<ubuf> points outside of your accessible address space."
7274 #: build/C/man2/ustat.2:84
7275 msgid "I<dev> does not refer to a device containing a mounted file system."
7279 #: build/C/man2/ustat.2:90
7281 "The mounted file system referenced by I<dev> does not support this "
7282 "operation, or any version of Linux before 1.3.16."
7286 #: build/C/man2/ustat.2:100
7288 "B<ustat>() is deprecated and has only been provided for compatibility. All "
7289 "new programs should use B<statfs>(2) instead."
7293 #: build/C/man2/ustat.2:100
7298 #. Some software tries to use this in order to test whether the
7299 #. underlying file system is NFS.
7301 #: build/C/man2/ustat.2:114
7303 "The HP-UX version of the I<ustat> structure has an additional field, "
7304 "I<f_blksize>, that is unknown elsewhere. HP-UX warns: For some file "
7305 "systems, the number of free inodes does not change. Such file systems will "
7306 "return -1 in the field I<f_tinode>. For some file systems, inodes are "
7307 "dynamically allocated. Such file systems will return the current number of "
7312 #: build/C/man2/ustat.2:117
7313 msgid "B<stat>(2), B<statfs>(2)"