Newer kernels store device strings in memory on USB device init. This makes querying them later safe. (Thanks Greg KH)

This commit is contained in:
Glenn Maynard
2005-04-22 01:33:53 +00:00
parent 8835706d8c
commit 37650adbec
@@ -393,8 +393,6 @@ void GetNewStorageDevices( vector<UsbStorageDevice>& vDevicesOut )
if( ReadFile( sPath + "device/../idProduct", sBuf ) )
sscanf( sBuf, "%x", &usbd.idProduct );
/* These queries cause communication with the USB device. Disabling
* them may result in higher reliability. */
if( ReadFile( sPath + "device/../serial", sBuf ) )
{
usbd.sSerial = sBuf;