2 .\" Copyright (c) 1994, X/Open Company Limited. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
7 .\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
8 .\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
9 .\" This notice shall appear on any product containing this material.
10 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
11 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
12 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
13 .TH FPATHCONF 2 "Sep 1, 2009"
15 fpathconf, pathconf \- get configurable pathname variables
21 \fBlong\fR \fBfpathconf\fR(\fBint\fR \fIfildes\fR, \fBint\fR \fIname\fR);
26 \fBlong\fR \fBpathconf\fR(\fBconst char *\fR\fIpath\fR, \fBint\fR \fIname\fR);
32 The \fBfpathconf()\fR and \fBpathconf()\fR functions determine the current
33 value of a configurable limit or option ( variable ) that is associated with a
37 For \fBpathconf()\fR, the \fIpath\fR argument points to the pathname of a file
41 For \fBfpathconf()\fR, the \fIfildes\fR argument is an open file descriptor.
44 The \fIname\fR argument represents the variable to be queried relative to that
45 file or directory. The variables in the following table come from
46 <\fBlimits.h\fR> or <\fBunistd.h\fR> and the symbolic constants, defined in
47 <\fBunistd.h\fR>, are the corresponding values used for \fIname:\fR
55 Variable Value of \fIname\fR Notes
57 {\fBACL_ENABLED\fR} \fB_PC_ACL_ENABLED\fR 10
59 {\fBFILESIZEBITS\fR} \fB_PC_FILESIZEBITS\fR 3,4
61 {\fBLINK_MAX\fR} \fB_PC_LINK_MAX\fR 1
63 {\fBMAX_CANON\fR} \fB_PC_MAX_CANON\fR 2
65 {\fBMAX_INPUT\fR} \fB_PC_MAX_INPUT\fR 2
67 {\fBMIN_HOLE_SIZE\fR} \fB_PC_MIN_HOLE_SIZE\fR 11
69 {\fBNAME_MAX\fR} \fB_PC_NAME_MAX\fR 3, 4
71 {\fBPATH_MAX\fR} \fB_PC_PATH_MAX\fR 4,5
73 {\fBPIPE_BUF\fR} \fB_PC_PIPE_BUF\fR 6
75 {\fBPOSIX_ALLOC_SIZE_MIN\fR} \fB_PC_ALLOC_SIZE_MIN\fR
77 {\fBPOSIX_REC_INCR_XFER_SIZE\fR} \fB_PC_REC_INCR_XFER_SIZE\fR
79 {\fBPOSIX_REC_MAX_XFER_SIZE\fR} \fB_PC_REC_MAX_XFER_SIZE\fR
81 {\fBPOSIX_REC_MIN_XFER_SIZE\fR} \fB_PC_REC_MIN_XFER_SIZE\fR
83 {\fBPOSIX_REC_XFER_ALIGN\fR} \fB_PC_REC_XFER_ALIGN\fR
85 {\fBSYMLINK_MAX\fR} \fB_PC_SYMLINK_MAX\fR 4, 9
87 {\fBXATTR_ENABLED\fR} \fB_PC_XATTR_ENABLED\fR 1
89 {\fBSATTR_ENABLED\fR} \fB_PC_SATTR_ENABLED\fR
91 {\fBXATTR_EXISTS\fR} \fB_PC_XATTR_EXISTS\fR 1
93 {\fBSATTR_EXISTS\fR} \fB_PC_SATTR_EXISTS\fR
95 {\fBACCESS_FILTERING\fR} \fB_PC_ACCESS_FILTERING\fR 12
97 \fB_POSIX_CHOWN_RESTRICTED\fR \fB_PC_CHOWN_RESTRICTED\fR 7
99 \fB_POSIX_NO_TRUNC\fR \fB_PC_NO_TRUNC\fR 3, 4
101 \fB_POSIX_VDISABLE\fR \fB_PC_VDISABLE\fR 2
103 \fB_POSIX_ASYNC_IO\fR \fB_PC_ASYNC_IO\fR 8
105 \fB_POSIX_PRIO_IO\fR \fB_PC_PRIO_IO\fR 8
107 \fB_POSIX_SYNC_IO\fR \fB_PC_SYNC_IO\fR 8
109 \fB_POSIX_TIMESTAMP_RESOLUTION\fR \fB_PC_TIMESTAMP_RESOLUTION\fR 1
118 If \fIpath\fR or \fIfildes\fR refers to a directory, the value returned
119 applies to the directory itself.
124 If \fIpath\fR or \fIfildes\fR does not refer to a terminal file, it is
125 unspecified whether an implementation supports an association of the variable
126 name with the specified file.
131 If \fIpath\fR or \fIfildes\fR refers to a directory, the value returned
132 applies to filenames within the directory.
137 If \fIpath\fR or \fIfildes\fR does not refer to a directory, it is
138 unspecified whether an implementation supports an association of the variable
139 name with the specified file.
144 If \fIpath\fR or \fIfildes\fR refers to a directory, the value returned is
145 the maximum length of a relative pathname when the specified directory is the
151 If \fIpath\fR refers to a FIFO, or \fIfildes\fR refers to a pipe or FIFO,
152 the value returned applies to the referenced object. If \fIpath\fR or
153 \fIfildes\fR refers to a directory, the value returned applies to any FIFO that
154 exists or can be created within the directory. If \fIpath\fR or \fIfildes\fR
155 refers to any other type of file, it is unspecified whether an implementation
156 supports an association of the variable name with the specified file.
161 If \fIpath\fR or \fIfildes\fR refers to a directory, the value returned
162 applies to any files, other than directories, that exist or can be created
163 within the directory.
168 If \fIpath\fR or \fIfildes\fR refers to a directory, it is unspecified
169 whether an implementation supports an association of the variable name with the
175 If \fIpath\fR or \fIfildes\fR refers to a directory, the value returned is
176 the maximum length of the string that a symbolic link in that directory can
182 If \fIpath\fR or \fIfildes\fR refers to a file or directory in a file
183 system that supports ACLs, the value returned is the bitwise inclusive OR of
184 the following flags associated with ACL types supported by the file system;
185 otherwise 0 is returned.
189 \fB\fB_ACL_ACE_ENABLED\fR\fR
192 The file system supports ACE ACLs.
198 \fB\fB_ACL_ACLENT_ENABLED\fR\fR
201 The file system supports UFS aclent ACLs.
208 If a filesystem supports the reporting of holes (see \fBlseek\fR(2),
209 \fBpathconf()\fR and \fBfpathconf()\fR return a positive number that represents
210 the minimum hole size returned in bytes. The offsets of holes returned will be
211 aligned to this same value. A special value of 1 is returned if the filesystem
212 does not specify the minimum hole size but still reports holes.
217 If \fIpath\fR or \fIfildes\fR refers to a directory and the file system in
218 which the directory resides supports access filtering, a non-zero value is
219 returned. Otherwise, 0 is returned.
224 If \fIname\fR is an invalid value, both \fBpathconf()\fR and \fBfpathconf()\fR
225 return \fB\(mi1\fR and \fBerrno\fR is set to indicate the error.
228 If the variable corresponding to \fIname\fR has no limit for the \fIpath\fR or
229 file descriptor, both \fBpathconf()\fR and \fBfpathconf()\fR return \fB\(mi1\fR
230 without changing \fBerrno\fR. If \fBpathconf()\fR needs to use \fIpath\fR to
231 determine the value of \fIname\fR and \fBpathconf()\fR does not support the
232 association of \fIname\fR with the file specified by \fIpath\fR, or if the
233 process did not have appropriate privileges to query the file specified by
234 \fIpath\fR, or \fIpath\fR does not exist, \fBpathconf()\fR returns \fB\(mi1\fR
235 and \fBerrno\fR is set to indicate the error.
238 If \fBfpathconf()\fR needs to use \fIfildes\fR to determine the value of
239 \fIname\fR and \fBfpathconf()\fR does not support the association of \fIname\fR
240 with the file specified by \fIfildes\fR, or if \fIfildes\fR is an invalid file
241 descriptor, \fBfpathconf()\fR returns \fB\(mi1\fR and \fBerrno\fR is set to
245 Otherwise \fBpathconf()\fR or \fBfpathconf()\fR returns the current variable
246 value for the file or directory without changing \fBerrno\fR. The value
247 returned will not be more restrictive than the corresponding value available to
248 the application when it was compiled with <\fBlimits.h\fR> or <\fBunistd.h\fR>.
252 The \fBpathconf()\fR function will fail if:
259 The value of \fIname\fR is not valid.
268 A loop exists in symbolic links encountered during resolution of the \fIpath\fR
274 The \fBfpathconf()\fR function will fail if:
281 The value of \fIname\fR is not valid.
286 The \fBpathconf()\fR function may fail if:
293 Search permission is denied for a component of the path prefix.
302 An association of the variable \fIname\fR with the specified file is not
309 \fB\fBENAMETOOLONG\fR\fR
312 The length of the \fIpath\fR argument exceeds {\fBPATH_MAX\fR} or a pathname
313 component is longer than {\fBNAME_MAX\fR}.
319 \fB\fBENAMETOOLONG\fR\fR
322 As a result of encountering a symbolic link in resolution of the \fIpath\fR
323 argument, the length of the substituted pathname string exceeded
333 A component of \fIpath\fR does not name an existing file or \fIpath\fR is an
343 A component of the path prefix is not a directory.
348 The \fBfpathconf()\fR function may fail if:
355 The \fIfildes\fR argument is not a valid file descriptor.
364 An association of the variable \fIname\fR with the specified file is not
371 The {\fBSYMLINK_MAX\fR} variable applies only to the \fBfpathconf()\fR
376 See \fBattributes\fR(5) for descriptions of the following attributes:
384 ATTRIBUTE TYPE ATTRIBUTE VALUE
386 Interface Stability Committed
388 MT-Level Async-Signal-Safe
390 Standard See \fBstandards\fR(5).
396 \fBlseek\fR(2), \fBconfstr\fR(3C), \fBlimits.h\fR(3HEAD), \fBsysconf\fR(3C),
397 \fBattributes\fR(5), \fBstandards\fR(5)