reuse Mount and Unmount

This commit is contained in:
Glenn Maynard
2005-12-10 01:46:58 +00:00
parent ad7ee70346
commit 7bf4380fb5
@@ -210,7 +210,7 @@ bool MemoryCardDriverThreaded_Linux::DoOneUpdate( bool bMount, vector<UsbStorage
continue; continue;
} }
if( !ExecuteCommand("mount " + d.sDevice) ) if( !this->Mount(&d) )
{ {
d.SetError( "MountFailed" ); d.SetError( "MountFailed" );
continue; continue;
@@ -232,7 +232,7 @@ bool MemoryCardDriverThreaded_Linux::DoOneUpdate( bool bMount, vector<UsbStorage
FILEMAN->Unmount( "dir", d.sOsMountDir, TEMP_MOUNT_POINT ); FILEMAN->Unmount( "dir", d.sOsMountDir, TEMP_MOUNT_POINT );
} }
ExecuteCommand( "sync; umount -l \"" + d.sOsMountDir + "\"" ); this->Unmount( &d );
LOG->Trace( "WriteTest: %s, Name: %s", d.m_State == UsbStorageDevice::STATE_ERROR? "failed":"succeeded", d.sName.c_str() ); LOG->Trace( "WriteTest: %s, Name: %s", d.m_State == UsbStorageDevice::STATE_ERROR? "failed":"succeeded", d.sName.c_str() );
} }