.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu) .\" .\" FIXME Probably all of the following should be documented: .\" _PC_SYNC_IO, .\" _PC_ASYNC_IO, .\" _PC_PRIO_IO, .\" _PC_SOCK_MAXBUF, .\" _PC_FILESIZEBITS, .\" _PC_REC_INCR_XFER_SIZE, .\" _PC_REC_MAX_XFER_SIZE, .\" _PC_REC_MIN_XFER_SIZE, .\" _PC_REC_XFER_ALIGN, .\" _PC_ALLOC_SIZE_MIN, .\" _PC_SYMLINK_MAX, .\" _PC_2_SYMLINKS .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved. .\" Translated Fri Mar 20 1998 by NAKANO Takeo .\" .TH FPATHCONF 3 2014\-05\-28 GNU "Linux Programmer's Manual" .SH 名前 fpathconf, pathconf \- ファイルの設定値を取得する .SH 書式 .nf \fB#include \fP .sp \fBlong fpathconf(int \fP\fIfd\fP\fB, int \fP\fIname\fP\fB);\fP .br \fBlong pathconf(const char *\fP\fIpath\fP\fB, int \fP\fIname\fP\fB);\fP .fi .SH 説明 \fBfpathconf\fP() はオープンされているファイルディスクリプター \fIfd\fP に対して設定されているオプション \fIname\fP の値を取得する。 .PP \fBpathconf\fP() はファイル名 \fIpath\fP に対して設定されているオプション \fIname\fP の値を取得する。 .PP 対応するマクロのうち \fI\fP で定義されているものは最小値である。アプリケーションによってはこれらの 値を変更してより有利な動作を行おうとするものがある。この場合でも \fBfpathconf\fP() または \fBpathconf\fP() は呼び出すことができる。この場合はより大きな値が返ることになろう。 .PP \fIname\fP を以下の定数のどれかにすると、対応する設定オプションが返される。 .TP \fB_PC_LINK_MAX\fP ファイルへのリンクの最大数を返す。 \fIfd\fP または \fIpath\fP がディレクトリの場合は、この値はディレクトリ全体に適用される。対応する マクロは \fB_POSIX_LINK_MAX\fP である。 .TP \fB_PC_MAX_CANON\fP フォーマット付き入力行の最大長を返す。このとき \fIfd\fP または \fIpath\fP は端末を参照していなければならない。 対応するマクロは \fB_POSIX_MAX_CANON\fP である。 .TP \fB_PC_MAX_INPUT\fP 入力行の最大長を返す。このとき \fIfd\fP または \fIpath\fP は端末を参照していなければならない。 対応するマクロは \fB_POSIX_MAX_INPUT\fP である。 .TP \fB_PC_NAME_MAX\fP ディレクトリ \fIpath\fP または \fIfd\fP 内に、そのプロセスが作成することができるファイル名の最大長を返す。 対応するマクロは \fB_POSIX_NAME_MAX\fP である。 .TP \fB_PC_PATH_MAX\fP \fIpath\fP または \fIfd\fP がカレントディレクトリの場合、相対パス名の最大長を返す。 対応するマクロは \fB_POSIX_PATH_MAX\fP である。 .TP \fB_PC_PIPE_BUF\fP パイプ (pipe) バッファーのサイズを返す。このとき \fIfd\fP はパイプか FIFO を参照していなければならず、 \fIpath\fP は FIFO を参照していなければならない。 対応するマクロは \fB_POSIX_PIPE_BUF\fP である。 .TP \fB_PC_CHOWN_RESTRICTED\fP このファイルに対する \fBchown\fP(2) の呼び出しが許されていない場合には 0 以外の値を返す。 \fIfd\fP または \fIpath\fP がディレクトリを参照している場合は、この制限はそのディレクトリのすべて のファイルに適用される。 対応するマクロは \fB_POSIX_CHOWN_RESTRICTED\fP である。 .TP \fB_PC_NO_TRUNC\fP アクセス中のファイル名が \fB_POSIX_NAME_MAX\fP よりも長く、エラーとなる場合には 0 以外の値を返す。 対応するマクロは \fB_POSIX_NAME_MAX\fP である。 .TP \fB_PC_VDISABLE\fP 特殊文字 (special character) の処理が許されていない場合は 0 以外の値を 返す。このとき \fIfd\fP または \fIpath\fP は端末を参照していなければならない。 .SH 返り値 (存在していれば) 制限値が返される。要求されたリソースへのシステムの制 限が存在していなければ \-1 が返され、 \fIerrno\fP は変更されない。エラーが起こった場合には \-1 が返され、 \fIerrno\fP がエラーに対応した値に設定される。 .SH 準拠 POSIX.1\-2001. .SH 注意 \fIname\fP に \fB_PC_NAME_MAX\fP を入れて返された値よりも長いファイル名を持つファイルが、与えられたディ レクトリに存在するかもしれない。 .PP いくつかの返り値はとても大きくなることがある。これらを使って メモリーの割り当てを行うのは適当ではない。 .SH 関連項目 \fBgetconf\fP(1), \fBopen\fP(2), \fBstatfs\fP(2), \fBconfstr\fP(3), \fBsysconf\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。