Skip to content

Commit

Permalink
fixup! vfs: Change inode_operations->stat and ->link's prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
heatd committed Dec 24, 2024
1 parent 4f3cdaf commit 1aaf9d9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion kernel/include/onyx/libfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
#include <errno.h>
#include <stdlib.h>

#include <onyx/compiler.h>
#include <onyx/types.h>
#include <onyx/vfs.h>

struct inode;
struct dentry;
struct file;
struct dirent;

__BEGIN_CDECLS

static inline int libfs_no_open(struct dentry *dir, const char *name, struct dentry *dentry)
{
return -ENOENT;
Expand Down Expand Up @@ -55,7 +59,7 @@ static inline struct inode *libfs_no_mknod(struct dentry *dentry, mode_t mode, d
return NULL;
}

static inline int libfs_no_link(struct file *target_ino, const char *name, struct dentry *dir)
static inline int libfs_no_link(struct dentry *old_dentry, struct dentry *new_dentry)
{
return -EROFS;
}
Expand All @@ -81,4 +85,11 @@ static inline int libfs_no_unlink(const char *name, int flags, struct dentry *di
return -EROFS;
}

off_t libfs_put_dots(struct dirent *buf, off_t off, struct dentry *dent);
void put_dir(const char *name, off_t off, ino_t ino, unsigned int dtype, struct dirent *buf);

int default_stat(struct stat *buf, const struct path *path);

__END_CDECLS

#endif

0 comments on commit 1aaf9d9

Please sign in to comment.