diff options
| author | Xin LI <delphij@FreeBSD.org> | 2026-09-03 07:33:31 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2026-09-03 07:56:24 +0000 |
| commit | 37aec55d0a7165960f686e5277f030ab3d44cf45 (patch) | |
| tree | 64213e1983ed586fdda0044573f74a31b5e1df77 /packages/libevent1/libevent1.ucl | |
| parent | d3c5464fee7b178a39c189363e48806a11fd3da4 (diff) | |
Build a 4.5 GiB FAT32 image whose LOST.DIR cluster sits exactly 4 GiB above
the single cluster of a PAYLOAD.BIN, so that truncating the offset of the
former to 32 bits yields the offset of the latter, then inject a lost cluster
chain and let fsck_msdosfs(8) reconnect it.
The test asserts both halves of the bug fixed in the previous commit: that
PAYLOAD.BIN's cluster is unchanged, and that a second pass no longer reports
the chain as lost, which it only stops doing once the directory entry reaches
the real LOST.DIR.
newfs_msdos(8) -C only calls ftruncate(2) and nothing outside the reserved
area, the FATs and a handful of clusters is ever written, so the image stays
sparse and costs about 2 MiB on disk.
The geometry is read back out of the BPB rather than assumed, so
newfs_msdos(8) stays free to lay the file system out differently; the test
fails with a clear message if the volume ever becomes too small to hold a
cluster a full 4 GiB beyond the data area.
MFC after: 1 week
Diffstat (limited to 'packages/libevent1/libevent1.ucl')
0 files changed, 0 insertions, 0 deletions
