]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: /dev/hdX block device nodes and /proc/dmesg
authorTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 08:01:55 +0000 (05:01 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 08:01:55 +0000 (05:01 -0300)
commit099db025ccdb1ab9f283e1a3f721c15dc4151953
tree99fe5e76cac6f084b911291aff34fc8256fc9413
parentdd70c4f5295496a2f501e9e26db2a603c9167d11
feat: /dev/hdX block device nodes and /proc/dmesg

1. ATA block devices in devfs:
   Detected ATA drives (hda, hdb, hdc, hdd) are now registered as
   block device nodes in /dev via ata_register_devfs(). Each node
   supports read/write at byte offsets (with sector-aligned I/O
   internally). Previously, drives were detected but invisible
   in /dev, so 'ls /dev' showed no disk devices and mount had to
   use ata_name_to_drive() internally.

2. /proc/dmesg:
   Added /proc/dmesg to procfs that reads the kprintf ring buffer
   via klog_read(). Uses heap allocation (16KB) to avoid kernel
   stack overflow. The 'dmesg' command now works correctly.
src/drivers/ata_pio.c
src/hal/x86/ata_pio.c
src/kernel/init.c
src/kernel/procfs.c