Commit | Line | Data |
---|---|---|
e0e72660 JG |
1 | /* |
2 | * Copyright (C) 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License, version 2 only, as | |
6 | * published by the Free Software Foundation. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
11 | * more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License along with | |
14 | * this program; if not, write to the Free Software Foundation, Inc., 51 | |
15 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | */ | |
17 | ||
18 | #ifndef FD_TRACKER_INODE_H | |
19 | #define FD_TRACKER_INODE_H | |
20 | ||
21 | #include <stdbool.h> | |
22 | ||
23 | struct lttng_inode; | |
24 | struct lttng_inode_registry; | |
25 | ||
26 | /* The inode registry is protected by the fd-tracker's lock. */ | |
27 | struct lttng_inode_registry *lttng_inode_registry_create(void); | |
28 | ||
29 | struct lttng_inode *lttng_inode_registry_get_inode( | |
5c1f54d1 JG |
30 | struct lttng_inode_registry *registry, |
31 | int fd, | |
e0e72660 JG |
32 | const char *path); |
33 | ||
34 | void lttng_inode_registry_destroy(struct lttng_inode_registry *registry); | |
35 | ||
36 | const char *lttng_inode_get_path(const struct lttng_inode *inode); | |
5c1f54d1 JG |
37 | int lttng_inode_rename(struct lttng_inode *inode, |
38 | const char *new_path, | |
e0e72660 JG |
39 | bool overwrite); |
40 | int lttng_inode_defer_unlink(struct lttng_inode *inode); | |
41 | void lttng_inode_put(struct lttng_inode *inode); | |
42 | ||
43 | #endif /* FD_TRACKER_INODE_H */ |