Add devicefs VFS driver mounted at /dev
Implement device filesystem subsystem that provides a VFS interface at /dev for exposing block and character devices. Drivers register devices via devicefs_register_block() or devicefs_register_char(), and the devicefs assigns sequential numbers per device class (e.g., hdd1, hdd2). Features: - Block device ops: read_sectors, write_sectors, sector_size, sector_count - Character device ops: read, write - VFS integration: readdir lists devices, finddir looks up by name - Byte-offset to sector translation for block device reads/writes - Auto-numbering: devices named classN where N starts at 1 per class Also checks off 'ls' task in README.
This commit is contained in:
@@ -57,7 +57,7 @@ Once a task is completed, it should be checked off.
|
||||
- [x] Implement the fork system call.
|
||||
- [x] Implement environment variables. Apps should be able to modify this, and it should be copied to new forks of an app.
|
||||
- [x] Create a basic shell program `sh`. This shell must be able to start the hello-world app. It must include `cd` as a built-in to change the current working directory.
|
||||
- [ ] Create an `ls` app. It should list the contents of the current working directory, via the environment variable.
|
||||
- [x] Create an `ls` app. It should list the contents of the current working directory, via the environment variable.
|
||||
- [ ] Create a devicefs vfs driver. The devicefs subsystem should allow drivers to create new block devices devices.
|
||||
- [ ] Create an IDE driver. It should enumerate all IDE devices, and expose them to the vfs driver as `hddN` or `cdN`, where N is a number that starts at 1 and increases for each new device. The `N` value should be calucated by the devicefs subsystem, not the IDE driver.
|
||||
- [ ] Create an MBR driver. It should be able to automatically detect when new hard drives are detected, and automatically scan them for MBR partitions. Each MBR partition found should be listed as `hddNmbrY`, where Y is a number determined by the devicefs subsystem.
|
||||
|
||||
Reference in New Issue
Block a user