unmount drive on memory card disconnect

This commit is contained in:
Chris Danford
2004-03-20 22:36:48 +00:00
parent 248b7428c7
commit a8fd20b5ab
@@ -279,6 +279,16 @@ bool MemoryCardDriver_Linux::MountAndTestWrite( UsbStorageDevice* pDevice, CStri
return true;
}
void MemoryCardDriver_Linux::Unmount( UsbStorageDevice* pDevice, CString sMountPoint )
{
if( !pDevice->sOsMountDir.empty() )
return;
CString sCommand = "umount " + pDevice->sOsMountDir;
LOG->Trace( "executing '%s'", sCommand.c_str() );
system( sCommand );
}
void MemoryCardDriver_Linux::Flush( UsbStorageDevice* pDevice )
{
if( !pDevice->sOsMountDir.empty() )