member, not static
This commit is contained in:
@@ -103,7 +103,6 @@ static void GetFileList( const CString &sPath, vector<CString> &out )
|
|||||||
|
|
||||||
bool MemoryCardDriverThreaded_Linux::USBStorageDevicesChanged()
|
bool MemoryCardDriverThreaded_Linux::USBStorageDevicesChanged()
|
||||||
{
|
{
|
||||||
static CString sLastDevices = "";
|
|
||||||
CString sThisDevices;
|
CString sThisDevices;
|
||||||
|
|
||||||
/* If a device is removed and reinserted, the inode of the /sys/block entry
|
/* If a device is removed and reinserted, the inode of the /sys/block entry
|
||||||
@@ -122,8 +121,8 @@ bool MemoryCardDriverThreaded_Linux::USBStorageDevicesChanged()
|
|||||||
sThisDevices += ssprintf( "%i,", (int) buf.st_ino );
|
sThisDevices += ssprintf( "%i,", (int) buf.st_ino );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bChanged = sThisDevices != sLastDevices;
|
bool bChanged = sThisDevices != m_sLastDevices;
|
||||||
sLastDevices = sThisDevices;
|
m_sLastDevices = sThisDevices;
|
||||||
if( bChanged )
|
if( bChanged )
|
||||||
LOG->Trace( "Change in USB storage devices detected." );
|
LOG->Trace( "Change in USB storage devices detected." );
|
||||||
return bChanged;
|
return bChanged;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ protected:
|
|||||||
void GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut );
|
void GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut );
|
||||||
bool USBStorageDevicesChanged();
|
bool USBStorageDevicesChanged();
|
||||||
bool TestWrite( UsbStorageDevice* pDevice );
|
bool TestWrite( UsbStorageDevice* pDevice );
|
||||||
|
|
||||||
|
CString m_sLastDevices;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ARCH_MEMORY_CARD_DRIVER
|
#ifdef ARCH_MEMORY_CARD_DRIVER
|
||||||
|
|||||||
Reference in New Issue
Block a user