early-access version 1785
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/logging/backend.h"
|
||||
#include "core/file_sys/mode.h"
|
||||
#include "core/file_sys/vfs.h"
|
||||
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#endif
|
||||
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/logging/backend.h"
|
||||
#include "core/file_sys/vfs.h"
|
||||
#include "core/file_sys/vfs_libzip.h"
|
||||
#include "core/file_sys/vfs_vector.h"
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include "common/fs/fs.h"
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/hex_util.h"
|
||||
#include "common/logging/backend.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
|
@@ -788,7 +788,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
||||
RegisterHandlers(functions);
|
||||
|
||||
if (Settings::values.enable_fs_access_log) {
|
||||
log_mode = AccessLogMode::SdCard;
|
||||
access_log_mode = AccessLogMode::SdCard;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1046,9 +1046,9 @@ void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
log_mode = rp.PopEnum<AccessLogMode>();
|
||||
access_log_mode = rp.PopEnum<AccessLogMode>();
|
||||
|
||||
LOG_DEBUG(Service_FS, "called, log_mode={}", log_mode);
|
||||
LOG_DEBUG(Service_FS, "called, access_log_mode={}", access_log_mode);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
@@ -1059,7 +1059,7 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushEnum(log_mode);
|
||||
rb.PushEnum(access_log_mode);
|
||||
}
|
||||
|
||||
void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
|
||||
|
@@ -63,7 +63,7 @@ private:
|
||||
FileSys::VirtualFile romfs;
|
||||
u64 current_process_id = 0;
|
||||
u32 access_log_program_index = 0;
|
||||
AccessLogMode log_mode = AccessLogMode::None;
|
||||
AccessLogMode access_log_mode = AccessLogMode::None;
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
@@ -365,10 +365,11 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result,
|
||||
}
|
||||
|
||||
void Reporter::SaveFSAccessLog(std::string log_message) const {
|
||||
const auto log_file =
|
||||
const auto access_log_path =
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt";
|
||||
|
||||
void(Common::FS::AppendStringToFile(log_file, Common::FS::FileType::TextFile, log_message));
|
||||
void(Common::FS::AppendStringToFile(access_log_path, Common::FS::FileType::TextFile,
|
||||
log_message));
|
||||
}
|
||||
|
||||
void Reporter::SaveUserReport() const {
|
||||
@@ -384,13 +385,13 @@ void Reporter::SaveUserReport() const {
|
||||
}
|
||||
|
||||
void Reporter::ClearFSAccessLog() const {
|
||||
const auto log_path =
|
||||
const auto access_log_path =
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt";
|
||||
|
||||
Common::FS::IOFile log_file{log_path, Common::FS::FileAccessMode::Write,
|
||||
Common::FS::FileType::TextFile};
|
||||
Common::FS::IOFile access_log_file{access_log_path, Common::FS::FileAccessMode::Write,
|
||||
Common::FS::FileType::TextFile};
|
||||
|
||||
if (!log_file.IsOpen()) {
|
||||
if (!access_log_file.IsOpen()) {
|
||||
LOG_ERROR(Common_Filesystem, "Failed to clear the filesystem access log.");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user