diff options
| author | Léo Lam <leo@leolam.fr> | 2020-10-26 19:01:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-26 19:01:26 +0100 |
| commit | 07e6d008bd6c34b8af07247935bc8aa6abc596df (patch) | |
| tree | e5084fc3c855e85bcff41046533ec765135e3656 /Source/Core/Common/SDCardUtil.cpp | |
| parent | 7f66de062c3c0b7d0f1e49682f8663dc978e76fc (diff) | |
| parent | 4e8df93f4179a684b507d9c712b7e8121fc83119 (diff) | |
Merge pull request #9187 from lioncash/commonlog
Common: Migrate logging to fmt
Diffstat (limited to 'Source/Core/Common/SDCardUtil.cpp')
| -rw-r--r-- | Source/Core/Common/SDCardUtil.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/Core/Common/SDCardUtil.cpp b/Source/Core/Common/SDCardUtil.cpp index 16f855f6ea..5c0747436f 100644 --- a/Source/Core/Common/SDCardUtil.cpp +++ b/Source/Core/Common/SDCardUtil.cpp @@ -35,7 +35,6 @@ #include "Common/SDCardUtil.h" #include <algorithm> -#include <cinttypes> #include <cstddef> #include <cstdio> #include <cstring> @@ -208,9 +207,8 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename) if (disk_size < 0x800000 || disk_size > 0x800000000ULL) { - ERROR_LOG(COMMON, - "Trying to create SD Card image of size %" PRIu64 "MB is out of range (8MB-32GB)", - disk_size / (1024 * 1024)); + ERROR_LOG_FMT(COMMON, "Trying to create SD Card image of size {}MB is out of range (8MB-32GB)", + disk_size / (1024 * 1024)); return false; } @@ -224,7 +222,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename) File::IOFile file(filename, "wb"); if (!file) { - ERROR_LOG(COMMON, "Could not create file '%s', aborting...", filename.c_str()); + ERROR_LOG_FMT(COMMON, "Could not create file '{}', aborting...", filename); return false; } @@ -285,9 +283,9 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename) return true; FailWrite: - ERROR_LOG(COMMON, "Could not write to '%s', aborting...", filename.c_str()); + ERROR_LOG_FMT(COMMON, "Could not write to '{}', aborting...", filename); if (unlink(filename.c_str()) < 0) - ERROR_LOG(COMMON, "unlink(%s) failed: %s", filename.c_str(), LastStrerrorString().c_str()); + ERROR_LOG_FMT(COMMON, "unlink({}) failed: {}", filename, LastStrerrorString()); return false; } } // namespace Common |
