diff --git a/src/common/cd_image_bin.cpp b/src/common/cd_image_bin.cpp index 26479387a..e7a5bb0c3 100644 --- a/src/common/cd_image_bin.cpp +++ b/src/common/cd_image_bin.cpp @@ -2,6 +2,7 @@ #include "cd_subchannel_replacement.h" #include "file_system.h" #include "log.h" +#include Log_SetChannel(CDImageBin); class CDImageBin : public CDImage @@ -49,7 +50,7 @@ bool CDImageBin::Open(const char* filename) m_fp = FileSystem::OpenCFile(filename, "rb"); if (!m_fp) { - Log_ErrorPrintf("Failed to open binfile '%s'", filename); + Log_ErrorPrintf("Failed to open binfile '%s': errno %d", filename, errno); return false; } diff --git a/src/common/cd_image_cue.cpp b/src/common/cd_image_cue.cpp index 161a5249b..3ac8f6a24 100644 --- a/src/common/cd_image_cue.cpp +++ b/src/common/cd_image_cue.cpp @@ -4,6 +4,7 @@ #include "file_system.h" #include "log.h" #include +#include #include #include Log_SetChannel(CDImageCueSheet); @@ -48,7 +49,7 @@ bool CDImageCueSheet::OpenAndParse(const char* filename) std::FILE* cue_fp = FileSystem::OpenCFile(filename, "rb"); if (!cue_fp) { - Log_ErrorPrintf("Failed to open cuesheet '%s'", filename); + Log_ErrorPrintf("Failed to open cuesheet '%s': errno %d", filename, errno); return false; } @@ -94,8 +95,8 @@ bool CDImageCueSheet::OpenAndParse(const char* filename) std::FILE* track_fp = FileSystem::OpenCFile(track_full_filename.c_str(), "rb"); if (!track_fp) { - Log_ErrorPrintf("Failed to open track filename '%s' (from '%s' and '%s')", track_full_filename.c_str(), - track_filename.c_str(), filename); + Log_ErrorPrintf("Failed to open track filename '%s' (from '%s' and '%s'): errno %d", + track_full_filename.c_str(), track_filename.c_str(), filename, errno); return false; }