Orion
Barry Importing existing Orion kernel d41a53c (2 years, 4 months ago)diff --git a/vfs/procfs/inode.c b/vfs/procfs/inode.c new file mode 100644 index 0000000..a81c3fc --- /dev/null +++ b/vfs/procfs/inode.c @@ -0,0 +1,69 @@ +/* + * This file contains the functions dealing with ProcFS inodes. The VFS will + * call these when it performs operations on ProcFS Inodes, or is dealing with + * the ProcFS hierarchy. + */ + +#include <string.h> +#include "fs.h" +#include "../vfs.h" +#include "../../mem/heap.h" + +int procfs_create(Inode *inode, DirEntry *entry, mode_t mode); +Inode *procfs_lookup(Inode *inode, const char *name); +int procfs_mkdir(Inode *inode, DirEntry *entry, mode_t mode); +int procfs_rmdir(Inode *inode, DirEntry *entry); +int procfs_mknod(Inode *inode, DirEntry *entry, mode_t mode, dev_t dev); +int procfs_rename(Inode *si, DirEntry *sde, Inode *di, DirEntry *dde); + +InodeOps procfsInodeOps = { + .create = procfs_create, + .lookup = procfs_lookup, + .mkdir = procfs_mkdir, + .rmdir = procfs_rmdir, + .mknod = procfs_mknod, + .rename = procfs_rename, +}; + +/* Create a file */ +int +procfs_create(Inode *inode, DirEntry *entry, mode_t mode) +{ + return 0; +} + + +/* Look up a file */ +Inode * +procfs_lookup(Inode *inode, const char *name) +{ + return NULL; +} + +/* Make a directory */ +int +procfs_mkdir(Inode *inode, DirEntry *entry, mode_t mode) +{ + return 0; +} + +/* Remove a directory */ +int +procfs_rmdir(Inode *inode, DirEntry *entry) +{ + return 0; +} + +/* Make a node */ +int +procfs_mknod(Inode *inode, DirEntry *entry, mode_t mode, dev_t dev) +{ + return 0; +} + +/* Rename/mode a directory entry */ +int +procfs_rename(Inode *si, DirEntry *sde, Inode *di, DirEntry *dde) +{ + return 0; +}