disable hdd->hdd threading. only open log write on write to allow for reads. log fw/ams version.

hdd->hdd threading is disabled due to a bug in libusbhsfs which causes a deadlock if 2 fs calls happen at the same time.
This commit is contained in:
ITotalJustice
2025-06-17 00:57:46 +01:00
parent 6b099de63c
commit 99c1db3655
11 changed files with 133 additions and 79 deletions

View File

@@ -500,7 +500,6 @@ Result OpenFile(fs::Fs* fs, const fs::FsPath& path, u32 mode, File* f) {
}
R_UNLESS(f->m_stdio, Result_FsUnknownStdioError);
std::strcpy(f->m_path, path);
}
R_SUCCEED();
@@ -580,17 +579,7 @@ Result File::GetSize(s64* out) {
R_TRY(fsFileGetSize(&m_native, out));
} else {
struct stat st;
const auto fd = fileno(m_stdio);
bool did_stat{};
if (fd && !fstat(fd, &st)) {
did_stat = true;
}
if (!did_stat) {
R_UNLESS(!lstat(m_path, &st), Result_FsUnknownStdioError);
}
R_UNLESS(!fstat(fileno(m_stdio), &st), Result_FsUnknownStdioError);
*out = st.st_size;
}