Files
Daniel Freitas aa7311b3af kernel: the utility drive reports the cluster size the XBE asked for
XAPI formats a title's cache partition (Harddisk0\Partition3-5, Z:) with
the cluster size in the top two bits of the XBE header's init flags
(16 KB << bits). XMountUtilityDrive then opens the partition for a
free-space query and requires SectorsPerAllocationUnit * BytesPerSector
to equal that size; otherwise it returns STATUS_UNRECOGNIZED_VOLUME and
XAPI boots to the dashboard with an error before the title's main runs.

The file layer always reported FATX's 16 KB. Turok: Evolution (init flags
0x80000007, 64 KB) exited at boot through HalReturnToFirmware(2).

The free-space open is redirected to the directory holding the image, so
NtCreateFile now records handles that came from Partition3-5.img and
NtQueryVolumeInformationFile reports the title's cluster size for them.
NtClose forgets the handle. xbox_MemoryLayoutInit passes the init flags
to the file layer, so kernel_file.c still needs no guest memory (the
kernel_directory_posix fixture builds it on its own).

Unchanged for every title whose flags leave those bits clear (16 KB), and
for E: and every other volume. Both backends.

tests/kernel_utility_cluster covers 16/32/64 KB, the data partition
staying at 16 KB, the default before any XBE, and a closed handle not
passing its size on. It fails on v0.17.0 (3 of 6 cases on Windows and
on Linux).
2026-11-08 17:43:57 -03:00
..