1LOOKUP_DCOOKIE(2)          Linux Programmer's Manual         LOOKUP_DCOOKIE(2)
2
3
4

NAME

6       lookup_dcookie - return a directory entry's path
7

SYNOPSIS

9       int lookup_dcookie(u64 cookie, char *buffer, size_t len);
10

DESCRIPTION

12       Look  up  the  full  path of the directory entry specified by the value
13       cookie.  The cookie is an opaque identifier uniquely identifying a par‐
14       ticular  directory  entry.  The buffer given is filled in with the full
15       path of the directory entry.
16
17       For lookup_dcookie() to return successfully, the kernel must still hold
18       a cookie reference to the directory entry.
19

RETURN VALUE

21       On  success,  lookup_dcookie()  returns  the  length of the path string
22       copied into the buffer.  On error, -1 is returned,  and  errno  is  set
23       appropriately.
24

ERRORS

26       EFAULT The buffer was not valid.
27
28       EINVAL The  kernel has no registered cookie/directory entry mappings at
29              the time of lookup, or the cookie does  not  refer  to  a  valid
30              directory entry.
31
32       ENAMETOOLONG
33              The name could not fit in the buffer.
34
35       ENOMEM The  kernel  could  not allocate memory for the temporary buffer
36              holding the path.
37
38       EPERM  The process does not have the capability CAP_SYS_ADMIN  required
39              to look up cookie values.
40
41       ERANGE The  buffer  was not large enough to hold the path of the direc‐
42              tory entry.
43

VERSIONS

45       Available since Linux 2.5.43.  The ENAMETOOLONG error return was  added
46       in 2.5.70.
47

CONFORMING TO

49       lookup_dcookie() is Linux-specific.
50

NOTES

52       lookup_dcookie()  is a special-purpose system call, currently used only
53       by the oprofile(1) profiler.  It relies on a kernel driver to  register
54       cookies for directory entries.
55
56       The  path  returned  may  be suffixed by the string " (deleted)" if the
57       directory entry has been removed.
58

SEE ALSO

60       oprofile(1)
61

COLOPHON

63       This page is part of release 5.02 of the Linux  man-pages  project.   A
64       description  of  the project, information about reporting bugs, and the
65       latest    version    of    this    page,    can     be     found     at
66       https://www.kernel.org/doc/man-pages/.
67
68
69
70Linux                             2017-09-15                 LOOKUP_DCOOKIE(2)
Impressum