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
20

NOTES

22       lookup_dcookie()  is a special-purpose system call, currently used only
23       by the oprofile profiler.  It relies on a  kernel  driver  to  register
24       cookies for directory entries.
25
26       The  path  returned  may  be suffixed by the string " (deleted)" if the
27       directory entry has been removed.
28
29

RETURN VALUE

31       On success, lookup_dcookie() returns the  length  of  the  path  string
32       copied  into  the  buffer.   On error, -1 is returned, and errno is set
33       appropriately.
34

ERRORS

36       EFAULT The buffer was not valid.
37
38       EINVAL The kernel has no registered cookie/directory entry mappings  at
39              the  time  of  lookup,  or  the cookie does not refer to a valid
40              directory entry.
41
42       ENAMETOOLONG
43              The name could not fit in the buffer.
44
45       ENOMEM The kernel could not allocate memory for  the  temporary  buffer
46              holding the path.
47
48       EPERM  The  process does not have the capability CAP_SYS_ADMIN required
49              to look up cookie values.
50
51       ERANGE The buffer was not large enough to hold the path of  the  direc‐
52              tory entry.
53

CONFORMING TO

55       lookup_dcookie() is Linux specific.
56

AVAILABILITY

58       Since Linux 2.5.43.  The ENAMETOOLONG error return was added in 2.5.70.
59
60
61
62Linux 2.6.7                       2004-06-17                 LOOKUP_DCOOKIE(2)
Impressum