fs: fix mounted ext2/fat stat and dirent regressions
Corrected:
- align kernel struct stat with the userspace ABI and update fulltest's local struct stat so stat/fstat copy the expected fields on mounted filesystems
- make getdents emit variable-length userspace dirent records with d_reclen and correct d_type values, and update ulibc readdir to consume them
- fix ext2 directory entry validation for exact-fit names and replace several 4KB on-stack buffers in ext2 inode/block/bitmap/write paths with heap-backed buffers to avoid stack-related crashes while listing and writing /disk
- populate sensible FAT mode/uid/gid defaults so ls -l reports sane metadata on FAT mounts
- preserve overlay root/initrd lifetime by keeping the initrd root registered separately and using a no-op close handler for the overlay root wrapper
Changed:
- add fulltest coverage for open('/disk') + getdents + close and for overlay root lifecycle after getdents/close/exec
- extend smoke_test.exp and test_battery.exp with the new /disk readdir and overlay root lifecycle expectations
- teach the minimal ulibc stdio formatter to accept a single 'l' length modifier so formats such as %lu work in ls -l output
TODO:
- add more targeted ext2 create/write regression coverage beyond the current fulltest/smoke battery if a smaller dedicated harness is introduced
- keep an eye on remaining direct getdents consumers, but the current tree passes make test and make test-battery in this state