diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp index 48e7d45098..1d2a75d165 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Linux.cpp @@ -5,6 +5,7 @@ #include "RageFileManager.h" #include +#include #include #include #include @@ -40,7 +41,7 @@ bool MemoryCardDriver_Linux::StorageDevicesChanged() struct stat st; if( fstat(m_fds, &st) == -1 ) { - LOG->Warn( "stat of '%s' failed.", USB_DEVICE_LIST_FILE ); + LOG->Warn( "stat '%s' failed: %s", USB_DEVICE_LIST_FILE, strerror(errno) ); return false; } @@ -191,16 +192,15 @@ void MemoryCardDriver_Linux::GetStorageDevices( vector& vDevic // /dev/sdc1 /mnt/flash3 auto noauto,owner 0 0 CString fn = "/etc/fstab"; - ifstream f; - f.open(fn); - if( !f.is_open() ) + RageFile f; + if( !f.Open(fn) ) { - LOG->Warn( "can't open '%s'", fn.c_str() ); + LOG->Warn( "can't open '%s': %s", fn.c_str(), f.GetError().c_str() ); return; } CString sLine; - while( getline(f, sLine) ) + while( f.GetLine(sLine) ) { // /dev/sda1 /mnt/flash1 auto noauto,owner 0 0 char cScsiDev;