inotify-watch: add inotify_watch_find_child
This commit is contained in:
parent
b5d9cf6c30
commit
6f472f800b
2 changed files with 3 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ void inotify_watch_rm(struct watch *watch) {
|
||||||
tree_unlink(&watch->tree);
|
tree_unlink(&watch->tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct watch* inoitfy_watch_find_child(struct watch *watch, const char *path) {
|
struct watch* inotify_watch_find_child(struct watch *watch, const char *path) {
|
||||||
|
|
||||||
if (watch->tree.child) {
|
if (watch->tree.child) {
|
||||||
struct watch *it = (struct watch *) watch->tree.child;
|
struct watch *it = (struct watch *) watch->tree.child;
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,6 @@ struct watch* inotify_watch_add(struct watch *parent, struct watch *watch);
|
||||||
|
|
||||||
void inotify_watch_rm(struct watch *watch);
|
void inotify_watch_rm(struct watch *watch);
|
||||||
|
|
||||||
|
struct watch* inotify_watch_find_child(struct watch *watch, const char *path);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Reference in a new issue