Remove MemoryCardDriver::Flush. Flush in Unmount instead.
This commit is contained in:
@@ -81,7 +81,6 @@ public:
|
||||
* before any access to the device, and before TestWrite. */
|
||||
virtual bool Mount( UsbStorageDevice* pDevice ) = 0;
|
||||
virtual void Unmount( UsbStorageDevice* pDevice ) = 0;
|
||||
virtual void Flush( UsbStorageDevice* pDevice ) = 0;
|
||||
|
||||
/* Poll for memory card changes. If anything has changed, fill in vStorageDevicesOut
|
||||
* and return true. */
|
||||
|
||||
@@ -308,16 +308,6 @@ void MemoryCardDriverThreaded_Linux::Unmount( UsbStorageDevice* pDevice )
|
||||
ExecuteCommand( sCommand );
|
||||
}
|
||||
|
||||
void MemoryCardDriverThreaded_Linux::Flush( UsbStorageDevice* pDevice )
|
||||
{
|
||||
if( pDevice->sDevice.empty() )
|
||||
return;
|
||||
|
||||
// "sync" will only flush all file systems at the same time. -Chris
|
||||
// That's OK.
|
||||
ExecuteCommand( "sync" );
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2005 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
@@ -9,7 +9,6 @@ public:
|
||||
virtual bool DoOneUpdate( bool bMount, vector<UsbStorageDevice>& vStorageDevicesOut );
|
||||
virtual bool Mount( UsbStorageDevice* pDevice );
|
||||
virtual void Unmount( UsbStorageDevice* pDevice );
|
||||
virtual void Flush( UsbStorageDevice* pDevice );
|
||||
|
||||
protected:
|
||||
void GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut );
|
||||
|
||||
@@ -18,7 +18,7 @@ MemoryCardDriverThreaded_OSX::~MemoryCardDriverThreaded_OSX()
|
||||
DarwinMCHelpers::Stop();
|
||||
}
|
||||
|
||||
void MemoryCardDriverThreaded_OSX::Flush( UsbStorageDevice *pDevice )
|
||||
void MemoryCardDriverThreaded_OSX::Unmount( UsbStorageDevice *pDevice )
|
||||
{
|
||||
if( pDevice->iRefNum == -1 )
|
||||
return;
|
||||
|
||||
@@ -9,8 +9,7 @@ public:
|
||||
MemoryCardDriverThreaded_OSX();
|
||||
~MemoryCardDriverThreaded_OSX();
|
||||
bool Mount( UsbStorageDevice *pDevice ) { return true; }
|
||||
void Unmount( UsbStorageDevice *pDevice ) { }
|
||||
void Flush( UsbStorageDevice *pDevice );
|
||||
void Unmount( UsbStorageDevice *pDevice );
|
||||
|
||||
protected:
|
||||
bool USBStorageDevicesChanged();
|
||||
|
||||
@@ -130,13 +130,6 @@ void MemoryCardDriverThreaded_Windows::Unmount( UsbStorageDevice* pDevice )
|
||||
// nothing to do here...
|
||||
}
|
||||
|
||||
void MemoryCardDriverThreaded_Windows::Flush( UsbStorageDevice* pDevice )
|
||||
{
|
||||
// Do we need anything here? I don't lose data if ejecting
|
||||
// soon after a write. From the activity LED, it looks like
|
||||
// Windows flushes automatically every ~2 seconds. -Chris
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -12,7 +12,6 @@ public:
|
||||
|
||||
virtual bool Mount( UsbStorageDevice* pDevice );
|
||||
virtual void Unmount( UsbStorageDevice* pDevice );
|
||||
virtual void Flush( UsbStorageDevice* pDevice );
|
||||
|
||||
private:
|
||||
void GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut );
|
||||
|
||||
Reference in New Issue
Block a user