remove FlushAndReset

This commit is contained in:
Glenn Maynard
2005-12-21 05:53:15 +00:00
parent a6aa42a9a4
commit 8ceb3e7421
2 changed files with 0 additions and 42 deletions
-40
View File
@@ -82,7 +82,6 @@ public:
/* These functions may time out. */ /* These functions may time out. */
bool Mount( const UsbStorageDevice *pDevice ); bool Mount( const UsbStorageDevice *pDevice );
bool Unmount( const UsbStorageDevice *pDevice ); bool Unmount( const UsbStorageDevice *pDevice );
bool Flush( const UsbStorageDevice *pDevice );
/* This function will not time out. */ /* This function will not time out. */
bool StorageDevicesChanged( vector<UsbStorageDevice> &aOut ); bool StorageDevicesChanged( vector<UsbStorageDevice> &aOut );
@@ -113,7 +112,6 @@ private:
{ {
REQ_MOUNT, REQ_MOUNT,
REQ_UNMOUNT, REQ_UNMOUNT,
REQ_FLUSH,
}; };
}; };
@@ -184,10 +182,6 @@ void ThreadedMemoryCardWorker::HandleRequest( int iRequest )
m_aMountedDevices.erase( it ); m_aMountedDevices.erase( it );
break; break;
} }
case REQ_FLUSH:
m_pDriver->Flush( &m_RequestDevice );
break;
} }
} }
@@ -251,21 +245,6 @@ bool ThreadedMemoryCardWorker::Unmount( const UsbStorageDevice *pDevice )
return true; return true;
} }
bool ThreadedMemoryCardWorker::Flush( const UsbStorageDevice *pDevice )
{
ASSERT( TimeoutEnabled() );
/* If we're currently in a timed-out state, fail. */
if( IsTimedOut() )
return false;
m_RequestDevice = *pDevice;
if( !DoRequest(REQ_FLUSH) )
return false;
return true;
}
static ThreadedMemoryCardWorker *g_pWorker = NULL; static ThreadedMemoryCardWorker *g_pWorker = NULL;
MemoryCardManager::MemoryCardManager() MemoryCardManager::MemoryCardManager()
@@ -642,25 +621,6 @@ void MemoryCardManager::UnmountCard( PlayerNumber pn )
this->UnPauseMountingThread(); this->UnPauseMountingThread();
} }
void MemoryCardManager::FlushAndReset()
{
/*
* Disabled for now. Currently, this is a no-op in Linux. It's a little
* tricky: we set the timeout period in Mount, and finish in Unmount, and
* this is called outside that; currently, flushing is done by Unmount.
* I think that's OK and this will probably go away, but I'm not sure yet.
FOREACH_PlayerNumber( p )
{
UsbStorageDevice &d = m_Device[p];
if( d.IsBlank() ) // no card assigned
continue; // skip
if( d.m_State == UsbStorageDevice::STATE_WRITE_ERROR )
continue; // skip
g_pWorker->Flush( &m_Device[p] );
}
*/
}
bool MemoryCardManager::PathIsMemCard( CString sDir ) const bool MemoryCardManager::PathIsMemCard( CString sDir ) const
{ {
FOREACH_PlayerNumber( p ) FOREACH_PlayerNumber( p )
-2
View File
@@ -33,8 +33,6 @@ public:
void PauseMountingThread( int iTimeout = 20 ); void PauseMountingThread( int iTimeout = 20 );
void UnPauseMountingThread(); void UnPauseMountingThread();
void FlushAndReset(); // force all files to be flushed to mounted memory cards
bool GetCardsLocked() const { return m_bCardsLocked; } bool GetCardsLocked() const { return m_bCardsLocked; }
bool PathIsMemCard( CString sDir ) const; bool PathIsMemCard( CString sDir ) const;