OSDN Git Service

abb977d75b0b5f796ab8241bd94f4d5015ddae68
[linuxjm/LDP_man-pages.git] / release / man2 / lookup_dcookie.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 2003 John Levon <levon@movementarian.org>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified 2004-06-17 Michael Kerrisk <mtk.manpages@gmail.com>
26 .\"
27 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
28 .\"         all rights reserved.
29 .\" Translated 2003-06-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .\" Updated 2003-09-30, Akihiro MOTOKI
31 .\" Updated 2005-02-10, Akihiro MOTOKI
32 .\"
33 .\"WORD:        opaque identifier       内部識別子
34 .\"WORD:        Linux specific          Linux 独自
35 .\"WORD:        capability              ケーパビリティ
36 .\"
37 .TH LOOKUP_DCOOKIE 2 2004-06-17 "Linux" "Linux Programmer's Manual"
38 .SH 名前
39 lookup_dcookie \- ディレクトリ・エントリのパス名を返す
40 .SH 書式
41 .BI "int lookup_dcookie(u64 " cookie ", char *" buffer ", size_t " len );
42 .SH 説明
43 .I cookie
44 値で指定されたディレクトリ・エントリのフルパス名を検索する。
45 cookie は、個々のディレクトリ・エントリを区別する内部識別子 (opaque
46 identifier) である。引き数で指定されたバッファに、ディレクトリ・エントリの
47 フルパス名が格納される。
48
49 .BR lookup_dcookie ()
50 が正常に値を返すためには、カーネルがディレクトリ・エントリへの cookie 参照を
51 保持していなければならない。
52 .SH 返り値
53 成功した場合、
54 .BR lookup_dcookie ()
55 はバッファにコピーしたパス文字列の長さを返す。
56 エラーの場合は \-1 を返し、
57 .I errno
58 に適切な値を設定する。
59 .SH エラー
60 .TP
61 .B EFAULT
62 バッファが有効でなかった。
63 .TP
64 .B EINVAL
65 検索が行われた時、cookie とディレクトリ・エントリのマッピングがカーネルに
66 登録されていなかったか、または cookie が有効なディレクトリ・エントリを
67 参照していない。
68 .TP
69 .B ENAMETOOLONG
70 名前がバッファに入り切らなかった。
71 .TP
72 .B ENOMEM
73 カーネルが、パス名を保持する一時バッファ用のメモリを割り当てることが
74 できなかった。
75 .TP
76 .B EPERM
77 プロセスが cookie 値を検索するのに必要なケーパビリティ
78 .B CAP_SYS_ADMIN
79 を持っていない。
80 .TP
81 .B ERANGE
82 バッファが、ディレクトリ・エントリのパス名を収容するのに
83 十分な大きさではなかった。
84 .SH バージョン
85 Linux 2.5.43 以降で利用できる。
86 エラー
87 .B ENAMETOOLONG
88 を返す仕様は 2.5.70 で追加された。
89 .SH 準拠
90 .BR lookup_dcookie ()
91 は Linux 独自の関数である。
92 .SH 注意
93 .BR lookup_dcookie ()
94 は特殊な用途に使われるシステムコールで、現在のところ oprofile profiler で
95 使われているだけである。
96
97 指定されたディレクトリ・エントリが削除されていた場合、返されるパス名の最後に
98 " (deleted)"
99 という文字列が付加されることがある。