☰
Debian Codegraph
@
0.0~git20260129.ec0effd-3
0.0~git20260129.ec0effd-2
/
/
libc-top-half
/
musl
/
src
/
ipc
/
ftok.c
☽
☼
libc-top-half/musl/src/ipc/ftok.c
code
plain
raw
MIT
2005-2019 Rich Felker <
[email protected]
>; 2005-2019 Many other contributors
debian/copyright
1
#include <sys/ipc.h>
2
#include <sys/stat.h>
3
4
key_t ftok(const char *path, int id)
5
{
6
struct stat st;
7
if (stat(path, &st) < 0) return -1;
8
9
return ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) | ((id & 0xffu) << 24));
10
}