]>
Commit | Line | Data |
---|---|---|
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 | |
26 | fpathconf, 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() | |
37 | gets a value for the configuration option | |
38 | .I name | |
39 | for the open file descriptor | |
40 | .IR filedes . | |
41 | .PP | |
42 | .B pathconf() | |
43 | gets a value for configuration option | |
44 | .I name | |
45 | for the file name | |
46 | .IR path . | |
47 | .PP | |
48 | The corresponding macros defined in | |
49 | .B <unistd.h> | |
50 | are minimum values; if an application wants to take advantage of values | |
51 | which may change, a call to | |
52 | .B fpathconf() | |
53 | or | |
54 | .B pathconf() | |
55 | can be made, which may yield more liberal results. | |
56 | .PP | |
57 | Setting | |
58 | .I name | |
59 | equal to one of the following constants returns the following | |
60 | configuration options: | |
61 | .TP | |
62 | .B _PC_LINK_MAX | |
63 | returns the maximum number of links to the file. If | |
64 | .I filedes | |
65 | or | |
66 | .I path | |
67 | refer to a directory, then the value applies to the whole directory. | |
68 | The corresponding macro is | |
69 | .BR _POSIX_LINK_MAX . | |
70 | .TP | |
71 | .B _PC_MAX_CANON | |
72 | returns the maximum length of a formatted input line, where | |
73 | .I filedes | |
74 | or | |
75 | .I path | |
76 | must refer to a terminal. | |
77 | The corresponding macro is | |
78 | .BR _POSIX_MAX_CANON . | |
79 | .TP | |
80 | .B _PC_MAX_INPUT | |
81 | returns the maximum length of an input line, where | |
82 | .I filedes | |
83 | or | |
84 | .I path | |
85 | must refer to a terminal. | |
86 | The corresponding macro is | |
87 | .BR _POSIX_MAX_INPUT . | |
88 | .TP | |
89 | .B _PC_NAME_MAX | |
90 | returns the maximum length of a filename in the directory | |
91 | .I path | |
92 | or | |
93 | .IR filedes . | |
94 | the process is allowed to create. | |
95 | The corresponding macro is | |
96 | .BR _POSIX_NAME_MAX . | |
97 | .TP | |
98 | .B _PC_PATH_MAX | |
99 | returns the maximum length of a relative pathname when | |
100 | .I path | |
101 | or | |
102 | .I filedes | |
103 | is the current working directory. The corresponding macro is | |
104 | .BR _POSIX_PATH_MAX . | |
105 | .TP | |
106 | .B _PC_PIPE_BUF | |
107 | returns the size of the pipe buffer, where | |
108 | .I filedes | |
109 | must refer to a pipe or FIFO and | |
110 | .I path | |
111 | must refer to a FIFO. The corresponding macro is | |
112 | .BR _POSIX_PIPE_BUF . | |
113 | .TP | |
114 | .B _PC_CHOWN_RESTRICTED | |
f59a3f19 | 115 | returns non-zero if the |
fea681da MK |
116 | .BR chown (2) |
117 | call may not be used on this file. If | |
118 | .I filedes | |
119 | or | |
120 | .I path | |
121 | refer to a directory, then this applies to all files in that | |
122 | directory. The corresponding macro is | |
123 | .BR _POSIX_CHOWN_RESTRICTED . | |
124 | .TP | |
125 | .B _PC_NO_TRUNC | |
f59a3f19 | 126 | returns non-zero if accessing filenames longer than |
fea681da MK |
127 | .B _POSIX_NAME_MAX |
128 | generates an error. The corresponding macro is | |
129 | .BR _POSIX_NO_TRUNC . | |
130 | .TP | |
131 | .B _PC_VDISABLE | |
f59a3f19 | 132 | returns non-zero if special character processing can be disabled, where |
fea681da MK |
133 | .I filedes |
134 | or | |
135 | .I path | |
136 | must refer to a terminal. | |
137 | .SH "RETURN VALUE" | |
138 | The limit is returned, if one exists. If the system does not have a | |
139 | limit for the requested resource, \-1 is returned, and | |
140 | .I errno | |
141 | is unchanged. If there is an error, \-1 is returned, and | |
142 | .I errno | |
143 | is set to reflect the nature of the error. | |
144 | .SH "CONFORMING TO" | |
145 | POSIX.1 | |
146 | .SH NOTES | |
147 | Files with name lengths longer than the value returned for | |
148 | .I name | |
149 | equal to | |
150 | .B _PC_NAME_MAX | |
151 | may exist in the given directory. | |
152 | .PP | |
153 | Some returned values may be huge; they are not suitable for allocating | |
154 | memory. | |
155 | .SH "SEE ALSO" | |
156 | .BR getconf (1), | |
157 | .BR open (2), | |
158 | .BR statfs (2), | |
159 | .BR sysconf (3) |