diff --git a/plugins/builtin/source/content/providers/disk_provider.cpp b/plugins/builtin/source/content/providers/disk_provider.cpp index 2396899db..edaa6cfa6 100644 --- a/plugins/builtin/source/content/providers/disk_provider.cpp +++ b/plugins/builtin/source/content/providers/disk_provider.cpp @@ -207,14 +207,14 @@ namespace hex::plugin::builtin { m_diskHandle = ::open(path.c_str(), O_RDWR); if (m_diskHandle == -1) { - this->setErrorMessage(hex::format("hex.builtin.provider.disk.error.read_rw"_lang, path, ::strerror(errno))); + this->setErrorMessage(hex::format("hex.builtin.provider.disk.error.read_rw"_lang, path, std::system_category().message(errno))); log::warn(this->getErrorMessage()); m_diskHandle = ::open(path.c_str(), O_RDONLY); m_writable = false; } if (m_diskHandle == -1) { - this->setErrorMessage(hex::format("hex.builtin.provider.disk.error.read_ro"_lang, path, ::strerror(errno))); + this->setErrorMessage(hex::format("hex.builtin.provider.disk.error.read_ro"_lang, path, std::system_category().message(errno))); log::warn(this->getErrorMessage()); m_readable = false; return false; diff --git a/plugins/builtin/source/content/providers/file_provider.cpp b/plugins/builtin/source/content/providers/file_provider.cpp index 6df5d2176..fc17496e9 100644 --- a/plugins/builtin/source/content/providers/file_provider.cpp +++ b/plugins/builtin/source/content/providers/file_provider.cpp @@ -232,7 +232,7 @@ namespace hex::plugin::builtin { m_writable = true; if (!wolv::io::fs::exists(m_path)) { - this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), ::strerror(ENOENT))); + this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), std::system_category().message(ENOENT))); return false; } @@ -243,7 +243,7 @@ namespace hex::plugin::builtin { file = wolv::io::File(m_path, wolv::io::File::Mode::Read); if (!file.isValid()) { m_readable = false; - this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), ::strerror(errno))); + this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), std::system_category().message(errno))); return false; } @@ -315,7 +315,7 @@ namespace hex::plugin::builtin { fullPath = path; if (!wolv::io::fs::exists(fullPath)) { - this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), ::strerror(ENOENT))); + this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), std::system_category().message(ENOENT))); } path = std::move(fullPath); diff --git a/plugins/builtin/source/content/providers/intel_hex_provider.cpp b/plugins/builtin/source/content/providers/intel_hex_provider.cpp index 9adc1c5a5..61d7a1ff1 100644 --- a/plugins/builtin/source/content/providers/intel_hex_provider.cpp +++ b/plugins/builtin/source/content/providers/intel_hex_provider.cpp @@ -197,7 +197,7 @@ namespace hex::plugin::builtin { bool IntelHexProvider::open() { auto file = wolv::io::File(m_sourceFilePath, wolv::io::File::Mode::Read); if (!file.isValid()) { - this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_sourceFilePath.string(), ::strerror(errno))); + this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_sourceFilePath.string(), std::system_category().message(errno))); return false; } diff --git a/plugins/builtin/source/content/providers/motorola_srec_provider.cpp b/plugins/builtin/source/content/providers/motorola_srec_provider.cpp index c98353953..e1933acc3 100644 --- a/plugins/builtin/source/content/providers/motorola_srec_provider.cpp +++ b/plugins/builtin/source/content/providers/motorola_srec_provider.cpp @@ -174,7 +174,7 @@ namespace hex::plugin::builtin { bool MotorolaSRECProvider::open() { auto file = wolv::io::File(m_sourceFilePath, wolv::io::File::Mode::Read); if (!file.isValid()) { - this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_sourceFilePath.string(), ::strerror(errno))); + this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_sourceFilePath.string(), std::system_category().message(errno))); return false; }