]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/fpathconf.3
Global edit: s/nonzero/non-zero/
[thirdparty/man-pages.git] / man3 / fpathconf.3
CommitLineData
fea681da
MK
1.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
11.\"
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
19.\"
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\" License.
23.\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu)
24.TH FPATHCONF 3 1993-04-04 "GNU" "Linux Programmer's Manual"
25.SH NAME
26fpathconf, pathconf \- get configuration values for files
27.SH SYNOPSIS
28.nf
29.B #include <unistd.h>
30.sp
31.BI "long fpathconf(int " filedes ", int " name );
32.nl
33.BI "long pathconf(char *" path ", int " name );
34.fi
35.SH DESCRIPTION
36.B fpathconf()
37gets a value for the configuration option
38.I name
39for the open file descriptor
40.IR filedes .
41.PP
42.B pathconf()
43gets a value for configuration option
44.I name
45for the file name
46.IR path .
47.PP
48The corresponding macros defined in
49.B <unistd.h>
50are minimum values; if an application wants to take advantage of values
51which may change, a call to
52.B fpathconf()
53or
54.B pathconf()
55can be made, which may yield more liberal results.
56.PP
57Setting
58.I name
59equal to one of the following constants returns the following
60configuration options:
61.TP
62.B _PC_LINK_MAX
63returns the maximum number of links to the file. If
64.I filedes
65or
66.I path
67refer to a directory, then the value applies to the whole directory.
68The corresponding macro is
69.BR _POSIX_LINK_MAX .
70.TP
71.B _PC_MAX_CANON
72returns the maximum length of a formatted input line, where
73.I filedes
74or
75.I path
76must refer to a terminal.
77The corresponding macro is
78.BR _POSIX_MAX_CANON .
79.TP
80.B _PC_MAX_INPUT
81returns the maximum length of an input line, where
82.I filedes
83or
84.I path
85must refer to a terminal.
86The corresponding macro is
87.BR _POSIX_MAX_INPUT .
88.TP
89.B _PC_NAME_MAX
90returns the maximum length of a filename in the directory
91.I path
92or
93.IR filedes .
94the process is allowed to create.
95The corresponding macro is
96.BR _POSIX_NAME_MAX .
97.TP
98.B _PC_PATH_MAX
99returns the maximum length of a relative pathname when
100.I path
101or
102.I filedes
103is the current working directory. The corresponding macro is
104.BR _POSIX_PATH_MAX .
105.TP
106.B _PC_PIPE_BUF
107returns the size of the pipe buffer, where
108.I filedes
109must refer to a pipe or FIFO and
110.I path
111must refer to a FIFO. The corresponding macro is
112.BR _POSIX_PIPE_BUF .
113.TP
114.B _PC_CHOWN_RESTRICTED
f59a3f19 115returns non-zero if the
fea681da
MK
116.BR chown (2)
117call may not be used on this file. If
118.I filedes
119or
120.I path
121refer to a directory, then this applies to all files in that
122directory. The corresponding macro is
123.BR _POSIX_CHOWN_RESTRICTED .
124.TP
125.B _PC_NO_TRUNC
f59a3f19 126returns non-zero if accessing filenames longer than
fea681da
MK
127.B _POSIX_NAME_MAX
128generates an error. The corresponding macro is
129.BR _POSIX_NO_TRUNC .
130.TP
131.B _PC_VDISABLE
f59a3f19 132returns non-zero if special character processing can be disabled, where
fea681da
MK
133.I filedes
134or
135.I path
136must refer to a terminal.
137.SH "RETURN VALUE"
138The limit is returned, if one exists. If the system does not have a
139limit for the requested resource, \-1 is returned, and
140.I errno
141is unchanged. If there is an error, \-1 is returned, and
142.I errno
143is set to reflect the nature of the error.
144.SH "CONFORMING TO"
145POSIX.1
146.SH NOTES
147Files with name lengths longer than the value returned for
148.I name
149equal to
150.B _PC_NAME_MAX
151may exist in the given directory.
152.PP
153Some returned values may be huge; they are not suitable for allocating
154memory.
155.SH "SEE ALSO"
156.BR getconf (1),
157.BR open (2),
158.BR statfs (2),
159.BR sysconf (3)