Commit graph vbos/include/fs/vfs.h
Author SHA1 Message Date
2534c317f2 vfs: inode: add inode modes and filetypes
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-04 22:21:21 +02:00
7799f3b622 vfs: further switch to dirent tracking
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-04 00:08:16 +02:00
f9d760993d vfs: switch to dirent tracking over inode tracking
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-02 22:14:54 +02:00
a8540494a9 vfs: add vfs_open
vfs_open parses a path and returns the correct inode. The out inode is a
double pointer argument passed to vfs_open, and the return value is an
error code, or 0

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-01 23:06:39 +02:00
f0a9ff299b gitignore: add .cpio
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-06-28 17:13:41 +02:00
750ffa2e16 fs: add ramfs 2026-05-12 07:31:17 -04:00
a252a3f8e9 kv2: initialize memory manager, early pci devices
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2026-05-12 03:00:45 -04:00
Michael Shaw
d2ef885e8d v2 initial commit 2026-04-11 11:35:31 -04:00
Michael Shaw
30ffa8780e vfs: add vfs_create_file 2025-02-24 20:01:31 -05:00
Michael Shaw
2bcd8dc6be ext2: add unlink 2025-02-24 19:35:23 -05:00
Michael Shaw
e42eb8d714 ext2: add writing features 2025-02-18 15:20:24 -05:00
Michael Shaw
623cb5905a ext2: add ext2 driver v2
This driver is not yet feature complete, yet it is much cleaner than the
old one.
2025-02-17 19:41:07 -05:00
Michael Shaw
4ec7ff5aaa ipc: add fifo 2025-02-12 20:01:48 -05:00
Michael Shaw
02c0a70a30 vfs: refcount file structs used in fdescs 2024-08-21 15:44:50 -04:00
Michael Shaw
dfed938383 sched: apply proper blocking mechanism for chardev
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2024-06-17 14:09:53 -04:00
Michael Shaw
285086d77d vfs: remove opendir, readdir, closedir 2024-02-12 22:47:18 -05:00
Michael Shaw
c487c4c9dd devfs: add vnodes to devfs tree 2024-02-12 21:11:56 -05:00
Michael Shaw
664e1ef2f1 vfs: add vfs_create and vfs_create_vno 2024-02-07 22:27:50 -05:00
Michael Shaw
30774dd58a vfs: remove unused read_vno fs_ops function 2024-01-30 22:41:54 -05:00
Michael Shaw
2c553ed124 vfs: remove horrible fd_special temporary hack 2024-01-30 22:34:29 -05:00
Michael Shaw
a10509f1e5 lib: move lib headers into lib directory 2024-01-30 22:00:20 -05:00
Michael Shaw
2f20777a47 fs: move directory parsing to vfs
Previously, the vfs heavily relied on the physical filesystem for
directory parsing, which limited capabilities to a single filesystem,
save letter-based indexing which will not be used.

Now, vnodes are parsed in the VFS, and only requested on-demand, greatly
reducing complexity and reliance on physical drivers for handling.

This temporarily removes the ability to create files with the current
drivers.
2024-01-30 18:54:59 -05:00
Michael Shaw
070af3aba0 fs: reorginize memory allocations and frees 2024-01-30 00:09:56 -05:00
Michael Shaw
aee65e1dd2 vfs: add new ext2 ops 2024-01-29 23:51:03 -05:00
Michael Shaw
d54aa794c5 ext2: mark root vnode no_free 2024-01-26 18:47:34 -05:00
Michael Shaw
d61edcbe7b ext2: use struct vnode instead of struct file 2024-01-26 18:41:09 -05:00
Michael Shaw
963a58cb53 fs: read root inode on fs init 2024-01-25 00:43:50 -05:00
Michael Shaw
e7434667b8 vfs: add vfs_mount 2024-01-24 22:00:47 -05:00
Michael Shaw
2e93013e12 vfs: add root vnode to fs struct 2024-01-24 20:10:49 -05:00
Michael Shaw
848c374d12 vfs: add type macros for directory entries 2024-01-24 20:09:27 -05:00
Michael Shaw
e2ea205129 proc: hack in special file descriptors
The previos commit broke executions of all program files due to a NULL
memory access when inserting special file descriptors. This will be
replaced when some sort of /dev fs is implemented
2024-01-24 18:49:06 -05:00
Michael Shaw
b7c10e80c2 vfs: complete restructure of vfs 2024-01-24 18:15:04 -05:00
Michael Shaw
67050f1a93 vfs: begin restructuring of vfs 2024-01-24 02:04:42 -05:00
Michael Shaw
3dda839cdd syscall: implement write syscall 2023-11-22 23:27:39 -05:00
Michael Shaw
f8b801236a vfs: remove kernel file descriptor numbers 2023-11-22 21:09:05 -05:00
Michael Shaw
37518aea81 usr: implement user process switching
This is a rather large commit, so the gist of it is this:

User context switching is now functional, after a change to the TSS, and
a few minor details in the scheduler and loader.

ELF parsing is rather primitive, but basically functional, as long as it
only loads code.

The interrupt 0x80 is for syscalls, and will switch from user mode to
kernel mode. It is currently the only interrupt that can be called from
user mode

This adds the syscall functionality, which currently uses a red-black
tree to store the function pointers, although when the table is more
flushed out, it will probably be replaced with an array

The pager now correctly marks the parent nodes with attributes as it
allocates them. Without doing this, the page table entries will never be
reached in lower privilege modes, causing page faults

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-11-20 22:07:35 -05:00
Michael Shaw
a85be6eb62 elf: add basic elf parsing 2023-11-15 12:50:46 -05:00
Michael Shaw
2e7b1acda8 vfs: switch from struct file to struct vnode
the vnode will provide a much simpler and more elegant API for
programming virtual filesystems
2023-10-30 19:54:31 -04:00
Michael Shaw
ad16d47783 vfs: change fs_ops struct in fs to a pointer 2023-10-29 22:37:28 -04:00
Michael Shaw
c186d3846c fs: add unlink operation 2023-10-24 01:09:33 -04:00
Michael Shaw
bec327a4cc vfs: add tell function 2023-10-23 21:54:32 -04:00
Michael Shaw
b2cacaf6cd ext2: fix issues with inode dirent allocation 2023-10-23 19:46:54 -04:00
Michael Shaw
16d5a07e5e fs: make path argument of open const again 2023-10-23 17:44:33 -04:00
Michael Shaw
19f32aef3f ext2: add ability to create files 2023-10-23 17:03:20 -04:00
Michael Shaw
0a1b73edc2 ext2: slightly clean up indirect read/alloc 2023-10-21 14:25:28 -04:00
Michael Shaw
f8d84c7780 ext2: implement file writing
there is much room for improvement in the traversal of indirectly linked
blocks
2023-10-21 12:54:35 -04:00
Michael Shaw
178d88b2aa fs: add ino_t 2023-10-21 11:11:03 -04:00
Michael Shaw
40d94feff4 vfs: implement seek 2023-10-21 11:08:44 -04:00
Michael Shaw
ad2de927e2 ext2/vfs: implement read fs call
also implement the cat command!
2023-10-21 00:46:42 -04:00
Michael Shaw
a1cea1f438 vfs: add closedir
also add `opendir`, `readdir`, and `closedir` to vfs.h
2023-10-20 12:28:17 -04:00