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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user