Files
BearddOddity 8226fa7529 kernel: log every file delete at the default level
A delete is the one file operation that loses data, and it was visible only
through XBOX_TRACE, which is compiled out of release builds. A title that
deletes a save container it judges invalid left no line in the log.

NtDeleteFile and NtSetInformationFile(FileDispositionInformation) with
DeleteFile set now write "[FILE] delete <host path>" through xbox_log at
INFO, in both the Win32 and the POSIX backends. A disposition that clears the
flag logs nothing. Nothing else changes: the same host calls follow, with the
same results.

Test: tests/kernel_file_delete_log makes three files, deletes one by path
and one by disposition, and reads the log back: exactly two delete lines,
each naming its file, none for the file left alone. With kernel_file.c at
v0.16.0 the test fails (no delete line at all).

Verified: the new test passes on Windows (MSVC) and Linux x86-64 (gcc);
kernel_file_status, kernel_file_relative, kernel_fatx_overwrite and
kernel_regressions still pass on Windows.

Blast radius: one INFO log line per delete. Deletes are rare; no title's
behaviour changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 04:33:54 -05:00
..