fix Linux compile error

This commit is contained in:
Chris Danford
2003-12-20 02:38:15 +00:00
parent e1aaaca46d
commit 799072e8b0
3 changed files with 8 additions and 3 deletions
@@ -229,13 +229,18 @@ bool MemoryCardDriver_Linux::MountAndTestWrite( UsbStorageDevice* pDevice )
return true;
}
void MemoryCardDriver_Linux::Unmount( UsbStorageDevice* pDevice )
void MemoryCardDriver_Linux::Flush( UsbStorageDevice* pDevice )
{
if( !pDevice->sOsMountDir.empty() )
return;
// unmount and mount again. Is there a better way to flush?
// "sync" will only flush all file systems at the same time. -Chris
CString sCommand = "umount " + pDevice->sOsMountDir;
LOG->Trace( "executing '%s'", sCommand.c_str() );
system( sCommand );
sCommand = "mount " + pDevice->sOsMountDir;
system( sCommand );
}
/*
@@ -11,7 +11,7 @@ public:
virtual bool StorageDevicesChanged();
virtual void GetStorageDevices( vector<UsbStorageDevice>& vStorageDevicesOut );
virtual bool MountAndTestWrite( UsbStorageDevice* pDevice );
virtual void Unmount( UsbStorageDevice* pDevice );
virtual void Flush( UsbStorageDevice* pDevice );
protected:
int m_fds;
time_t m_lastModTime;
@@ -10,7 +10,7 @@ public:
virtual bool StorageDevicesChanged() { return false; };
virtual void GetStorageDevices( vector<UsbStorageDevice>& vStorageDevicesOut ) {};
virtual bool MountAndTestWrite( UsbStorageDevice* pDevice ) { return false; };
virtual void Unmount( UsbStorageDevice* pDevice ) {};
virtual void Flush( UsbStorageDevice* pDevice ) {};
};
#endif