diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-19 23:05:21 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-19 23:05:21 -0400 |
commit | 673753e8befcfbb575380ed0d23fc6741b4e50a0 (patch) | |
tree | 087ef9499c52523601b8d95d74eec709885a0899 /sys/kern/kern_filedesc.c | |
parent | f9a6fc6f474ced84a78df50e2b105bd7da052d06 (diff) |
kernel: vfs: Add support for open hook
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_filedesc.c')
-rw-r--r-- | sys/kern/kern_filedesc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c index 6bce6d2..74ab859 100644 --- a/sys/kern/kern_filedesc.c +++ b/sys/kern/kern_filedesc.c @@ -291,12 +291,15 @@ open(const char *pathname, int oflag) int status; /* - * Attempt to create a vnode and allocate a - * file descriptor + * Attempt to create a vnode, call the open hook then + * allocate a file descriptor */ if ((status = vfs_path_to_node(pathname, &vp)) != 0) { return status; } + if ((status = vfs_open(vp)) != 0) { + return status; + } if ((status = fd_alloc(this_td(), &fd)) != 0) { return status; } |