diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/file_util.cpp | 18 | ||||
| -rw-r--r-- | src/core/file_sys/archive_extsavedata.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/archive_sdmcwriteonly.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/archive_source_sd_savedata.cpp | 2 | ||||
| -rw-r--r-- | src/core/loader/loader.cpp | 2 | ||||
| -rw-r--r-- | src/core/loader/ncch.cpp | 9 |
7 files changed, 20 insertions, 17 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index df234c225..5ab036b34 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -118,8 +118,7 @@ bool IsDirectory(const std::string& filename) { | |||
| 118 | #endif | 118 | #endif |
| 119 | 119 | ||
| 120 | if (result < 0) { | 120 | if (result < 0) { |
| 121 | LOG_WARNING(Common_Filesystem, "stat failed on %s: %s", filename.c_str(), | 121 | LOG_DEBUG(Common_Filesystem, "stat failed on %s: %s", filename.c_str(), GetLastErrorMsg()); |
| 122 | GetLastErrorMsg()); | ||
| 123 | return false; | 122 | return false; |
| 124 | } | 123 | } |
| 125 | 124 | ||
| @@ -129,12 +128,12 @@ bool IsDirectory(const std::string& filename) { | |||
| 129 | // Deletes a given filename, return true on success | 128 | // Deletes a given filename, return true on success |
| 130 | // Doesn't supports deleting a directory | 129 | // Doesn't supports deleting a directory |
| 131 | bool Delete(const std::string& filename) { | 130 | bool Delete(const std::string& filename) { |
| 132 | LOG_INFO(Common_Filesystem, "file %s", filename.c_str()); | 131 | LOG_TRACE(Common_Filesystem, "file %s", filename.c_str()); |
| 133 | 132 | ||
| 134 | // Return true because we care about the file no | 133 | // Return true because we care about the file no |
| 135 | // being there, not the actual delete. | 134 | // being there, not the actual delete. |
| 136 | if (!Exists(filename)) { | 135 | if (!Exists(filename)) { |
| 137 | LOG_WARNING(Common_Filesystem, "%s does not exist", filename.c_str()); | 136 | LOG_DEBUG(Common_Filesystem, "%s does not exist", filename.c_str()); |
| 138 | return true; | 137 | return true; |
| 139 | } | 138 | } |
| 140 | 139 | ||
| @@ -169,8 +168,7 @@ bool CreateDir(const std::string& path) { | |||
| 169 | return true; | 168 | return true; |
| 170 | DWORD error = GetLastError(); | 169 | DWORD error = GetLastError(); |
| 171 | if (error == ERROR_ALREADY_EXISTS) { | 170 | if (error == ERROR_ALREADY_EXISTS) { |
| 172 | LOG_WARNING(Common_Filesystem, "CreateDirectory failed on %s: already exists", | 171 | LOG_DEBUG(Common_Filesystem, "CreateDirectory failed on %s: already exists", path.c_str()); |
| 173 | path.c_str()); | ||
| 174 | return true; | 172 | return true; |
| 175 | } | 173 | } |
| 176 | LOG_ERROR(Common_Filesystem, "CreateDirectory failed on %s: %i", path.c_str(), error); | 174 | LOG_ERROR(Common_Filesystem, "CreateDirectory failed on %s: %i", path.c_str(), error); |
| @@ -182,7 +180,7 @@ bool CreateDir(const std::string& path) { | |||
| 182 | int err = errno; | 180 | int err = errno; |
| 183 | 181 | ||
| 184 | if (err == EEXIST) { | 182 | if (err == EEXIST) { |
| 185 | LOG_WARNING(Common_Filesystem, "mkdir failed on %s: already exists", path.c_str()); | 183 | LOG_DEBUG(Common_Filesystem, "mkdir failed on %s: already exists", path.c_str()); |
| 186 | return true; | 184 | return true; |
| 187 | } | 185 | } |
| 188 | 186 | ||
| @@ -197,7 +195,7 @@ bool CreateFullPath(const std::string& fullPath) { | |||
| 197 | LOG_TRACE(Common_Filesystem, "path %s", fullPath.c_str()); | 195 | LOG_TRACE(Common_Filesystem, "path %s", fullPath.c_str()); |
| 198 | 196 | ||
| 199 | if (FileUtil::Exists(fullPath)) { | 197 | if (FileUtil::Exists(fullPath)) { |
| 200 | LOG_WARNING(Common_Filesystem, "path exists %s", fullPath.c_str()); | 198 | LOG_DEBUG(Common_Filesystem, "path exists %s", fullPath.c_str()); |
| 201 | return true; | 199 | return true; |
| 202 | } | 200 | } |
| 203 | 201 | ||
| @@ -229,7 +227,7 @@ bool CreateFullPath(const std::string& fullPath) { | |||
| 229 | 227 | ||
| 230 | // Deletes a directory filename, returns true on success | 228 | // Deletes a directory filename, returns true on success |
| 231 | bool DeleteDir(const std::string& filename) { | 229 | bool DeleteDir(const std::string& filename) { |
| 232 | LOG_INFO(Common_Filesystem, "directory %s", filename.c_str()); | 230 | LOG_TRACE(Common_Filesystem, "directory %s", filename.c_str()); |
| 233 | 231 | ||
| 234 | // check if a directory | 232 | // check if a directory |
| 235 | if (!FileUtil::IsDirectory(filename)) { | 233 | if (!FileUtil::IsDirectory(filename)) { |
| @@ -693,6 +691,8 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new | |||
| 693 | paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP; | 691 | paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP; |
| 694 | if (!FileUtil::IsDirectory(paths[D_USER_IDX])) { | 692 | if (!FileUtil::IsDirectory(paths[D_USER_IDX])) { |
| 695 | paths[D_USER_IDX] = AppDataRoamingDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP; | 693 | paths[D_USER_IDX] = AppDataRoamingDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP; |
| 694 | } else { | ||
| 695 | LOG_INFO(Common_Filesystem, "Using the local user directory"); | ||
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP; | 698 | paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP; |
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index dd2fb167f..f454e7840 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp | |||
| @@ -173,7 +173,7 @@ Path ConstructExtDataBinaryPath(u32 media_type, u32 high, u32 low) { | |||
| 173 | ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_location, | 173 | ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_location, |
| 174 | bool shared) | 174 | bool shared) |
| 175 | : shared(shared), mount_point(GetExtDataContainerPath(mount_location, shared)) { | 175 | : shared(shared), mount_point(GetExtDataContainerPath(mount_location, shared)) { |
| 176 | LOG_INFO(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str()); | 176 | LOG_DEBUG(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str()); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | bool ArchiveFactory_ExtSaveData::Initialize() { | 179 | bool ArchiveFactory_ExtSaveData::Initialize() { |
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 72ff05c65..679909d06 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -306,7 +306,7 @@ u64 SDMCArchive::GetFreeBytes() const { | |||
| 306 | 306 | ||
| 307 | ArchiveFactory_SDMC::ArchiveFactory_SDMC(const std::string& sdmc_directory) | 307 | ArchiveFactory_SDMC::ArchiveFactory_SDMC(const std::string& sdmc_directory) |
| 308 | : sdmc_directory(sdmc_directory) { | 308 | : sdmc_directory(sdmc_directory) { |
| 309 | LOG_INFO(Service_FS, "Directory %s set as SDMC.", sdmc_directory.c_str()); | 309 | LOG_DEBUG(Service_FS, "Directory %s set as SDMC.", sdmc_directory.c_str()); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | bool ArchiveFactory_SDMC::Initialize() { | 312 | bool ArchiveFactory_SDMC::Initialize() { |
diff --git a/src/core/file_sys/archive_sdmcwriteonly.cpp b/src/core/file_sys/archive_sdmcwriteonly.cpp index 2aafc9b1d..244aef48a 100644 --- a/src/core/file_sys/archive_sdmcwriteonly.cpp +++ b/src/core/file_sys/archive_sdmcwriteonly.cpp | |||
| @@ -32,7 +32,7 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SDMCWriteOnlyArchive::OpenDirectory | |||
| 32 | 32 | ||
| 33 | ArchiveFactory_SDMCWriteOnly::ArchiveFactory_SDMCWriteOnly(const std::string& mount_point) | 33 | ArchiveFactory_SDMCWriteOnly::ArchiveFactory_SDMCWriteOnly(const std::string& mount_point) |
| 34 | : sdmc_directory(mount_point) { | 34 | : sdmc_directory(mount_point) { |
| 35 | LOG_INFO(Service_FS, "Directory %s set as SDMCWriteOnly.", sdmc_directory.c_str()); | 35 | LOG_DEBUG(Service_FS, "Directory %s set as SDMCWriteOnly.", sdmc_directory.c_str()); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | bool ArchiveFactory_SDMCWriteOnly::Initialize() { | 38 | bool ArchiveFactory_SDMCWriteOnly::Initialize() { |
diff --git a/src/core/file_sys/archive_source_sd_savedata.cpp b/src/core/file_sys/archive_source_sd_savedata.cpp index e01357891..f31a68038 100644 --- a/src/core/file_sys/archive_source_sd_savedata.cpp +++ b/src/core/file_sys/archive_source_sd_savedata.cpp | |||
| @@ -39,7 +39,7 @@ std::string GetSaveDataMetadataPath(const std::string& mount_location, u64 progr | |||
| 39 | 39 | ||
| 40 | ArchiveSource_SDSaveData::ArchiveSource_SDSaveData(const std::string& sdmc_directory) | 40 | ArchiveSource_SDSaveData::ArchiveSource_SDSaveData(const std::string& sdmc_directory) |
| 41 | : mount_point(GetSaveDataContainerPath(sdmc_directory)) { | 41 | : mount_point(GetSaveDataContainerPath(sdmc_directory)) { |
| 42 | LOG_INFO(Service_FS, "Directory %s set as SaveData.", mount_point.c_str()); | 42 | LOG_DEBUG(Service_FS, "Directory %s set as SaveData.", mount_point.c_str()); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveSource_SDSaveData::Open(u64 program_id) { | 45 | ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveSource_SDSaveData::Open(u64 program_id) { |
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 147bf8591..be719d74c 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -139,7 +139,7 @@ std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { | |||
| 139 | type = filename_type; | 139 | type = filename_type; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | LOG_INFO(Loader, "Loading file %s as %s...", filename.c_str(), GetFileTypeString(type)); | 142 | LOG_DEBUG(Loader, "Loading file %s as %s...", filename.c_str(), GetFileTypeString(type)); |
| 143 | 143 | ||
| 144 | return GetFileLoader(std::move(file), type, filename_filename, filename); | 144 | return GetFileLoader(std::move(file), type, filename_filename, filename); |
| 145 | } | 145 | } |
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index 98b8259d9..1a4e3efa8 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <cinttypes> | ||
| 6 | #include <cstring> | 7 | #include <cstring> |
| 7 | #include <memory> | 8 | #include <memory> |
| 8 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| @@ -253,7 +254,7 @@ ResultStatus AppLoader_NCCH::LoadExeFS() { | |||
| 253 | 254 | ||
| 254 | // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)... | 255 | // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)... |
| 255 | if (MakeMagic('N', 'C', 'S', 'D') == ncch_header.magic) { | 256 | if (MakeMagic('N', 'C', 'S', 'D') == ncch_header.magic) { |
| 256 | LOG_WARNING(Loader, "Only loading the first (bootable) NCCH within the NCSD file!"); | 257 | LOG_DEBUG(Loader, "Only loading the first (bootable) NCCH within the NCSD file!"); |
| 257 | ncch_offset = 0x4000; | 258 | ncch_offset = 0x4000; |
| 258 | file.Seek(ncch_offset, SEEK_SET); | 259 | file.Seek(ncch_offset, SEEK_SET); |
| 259 | file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); | 260 | file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); |
| @@ -277,8 +278,8 @@ ResultStatus AppLoader_NCCH::LoadExeFS() { | |||
| 277 | priority = exheader_header.arm11_system_local_caps.priority; | 278 | priority = exheader_header.arm11_system_local_caps.priority; |
| 278 | resource_limit_category = exheader_header.arm11_system_local_caps.resource_limit_category; | 279 | resource_limit_category = exheader_header.arm11_system_local_caps.resource_limit_category; |
| 279 | 280 | ||
| 280 | LOG_INFO(Loader, "Name: %s", exheader_header.codeset_info.name); | 281 | LOG_DEBUG(Loader, "Name: %s", exheader_header.codeset_info.name); |
| 281 | LOG_INFO(Loader, "Program ID: %016llX", ncch_header.program_id); | 282 | LOG_DEBUG(Loader, "Program ID: %016" PRIX64, ncch_header.program_id); |
| 282 | LOG_DEBUG(Loader, "Code compressed: %s", is_compressed ? "yes" : "no"); | 283 | LOG_DEBUG(Loader, "Code compressed: %s", is_compressed ? "yes" : "no"); |
| 283 | LOG_DEBUG(Loader, "Entry point: 0x%08X", entry_point); | 284 | LOG_DEBUG(Loader, "Entry point: 0x%08X", entry_point); |
| 284 | LOG_DEBUG(Loader, "Code size: 0x%08X", code_size); | 285 | LOG_DEBUG(Loader, "Code size: 0x%08X", code_size); |
| @@ -336,6 +337,8 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 336 | if (result != ResultStatus::Success) | 337 | if (result != ResultStatus::Success) |
| 337 | return result; | 338 | return result; |
| 338 | 339 | ||
| 340 | LOG_INFO(Loader, "Program ID: %016" PRIX64, ncch_header.program_id); | ||
| 341 | |||
| 339 | is_loaded = true; // Set state to loaded | 342 | is_loaded = true; // Set state to loaded |
| 340 | 343 | ||
| 341 | result = LoadExec(); // Load the executable into memory for booting | 344 | result = LoadExec(); // Load the executable into memory for booting |