Commit Graph

17 Commits

Author SHA1 Message Date
96b1d1c2f2 Devices: Tell a device which name you want it to be instantiated with
This allows us to create a device in any path, with any filename.
2022-10-12 10:54:46 +02:00
eb03ae91e0 Devices: Add a new Serial device
This device permits userspace to interface with the serial port.
2022-10-12 10:44:30 +02:00
e764647133 Devices: add a new ConsoleDevice
This new device is the userspace interface to the text console/tty.
2022-10-11 21:04:50 +02:00
e67ef7778c VFS: Support writing to files 2022-10-11 21:03:30 +02:00
04da26bff5 kernel: add a few comments 2022-10-11 19:51:24 +02:00
0a7d4a530d VFS, DeviceFS: Implement a device filesystem
For now, we just have a version device. (this will allow us to get rid of sys_getversion!!)
More should be implemented soon.
2022-10-11 19:21:16 +02:00
4aa3da8c12 VFS: Add basic mount(), unmount() and mkdir() functions (not accessible to userspace yet) 2022-10-11 18:23:00 +02:00
1278cec065 VFS: Add a 'type' flag to Nodes, implement EISDIR 2022-10-11 17:48:11 +02:00
da2ede3450 Kernel, libc, userspace: Implement file descriptors
Kernel: Implement a descriptor struct which stores the opened node and read offset, and give each task 8 of those.
Implement three syscalls: sys_read, sys_open and sys_close (sys_write still writes to the console instead of using a fd, for now)
Implement three new errors: ENOENT, EBADF and EMFILE.

libc: Implement the new errors, and the new syscalls in syscall().
Also fix _RETURN_WITH_ERRNO() to set errno correctly, which was making strerror() return null, thus crashing perror().

userspace: make init demonstrate the new file API.
2022-10-10 20:21:39 +02:00
63b2de4e3c Basic FDs 2022-10-10 19:00:24 +02:00
bbe7c6e658 VFS: Implement resolve_path and form the initial ramdisk's VFS properly
Finally, resolve_path: a function which takes a path (/etc/fstab for example), and walks the VFS:
In this case, it would start with the root FS node, and ask it: "do you have a directory/file named etc?"
The node could say 'yes', 'no', or 'i'm not a directory, I'm a file' (should not be the case for the VFS root, but for the other ones it could be)
If it says yes, we continue and ask the child if it has a file named fstab. Etc...
2022-10-10 18:44:43 +02:00
2be70d0bc1 VFS: Use 64-bit numbers in read()
There is no need for any kind of 32-bit compatibility.
2022-10-09 21:30:38 +02:00
8158ddc94f VFS: be more verbose 2022-10-09 21:19:22 +02:00
b38c52f8c7 more vfs stuff 2022-10-08 21:35:19 +02:00
f3d7e220ac The beginnings of a VFS implementation!! 2022-10-08 21:22:46 +02:00
a086ec514b Remove the Superblock.h file which has never been used.
This file was included for a future Ext2 implementation. It should be included when said Ext2 implementation is actually started.
2022-10-08 13:28:30 +02:00
1b727a66ea Ready. Set. Go! 2022-09-05 16:13:51 +02:00