hopefully temporary hack to work around us scanning /sys too quickly for the kernel; this is really a kernel bug

This commit is contained in:
Glenn Maynard
2008-08-11 18:53:43 +00:00
parent 2e59d76224
commit d97af6a158
@@ -136,6 +136,11 @@ void MemoryCardDriverThreaded_Linux::GetUSBStorageDevices( vector<UsbStorageDevi
continue;
/* HACK: The kernel isn't exposing all of /sys atomically, so we end up
* missing the partition due to it not being shown yet. The kernel should
* be exposing all of this atomically. */
usleep(50000);
/* If the first partition device exists, eg. /sys/block/uba/uba1, use it. */
if( access(usbd.sSysPath + sDevice + "1", F_OK) != -1 )
usbd.sDevice = "/dev/" + sDevice + "1";