Less stupid boolean name, grep is silent now
authorMark Cannon <vyhdycokio@gmail.com>
Thu, 29 May 2008 23:59:48 +0000 (23:59 +0000)
committerMark Cannon <vyhdycokio@gmail.com>
Thu, 29 May 2008 23:59:48 +0000 (23:59 +0000)
git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@357 83fadc84-e282-4d84-a09a-c4228d6ae7e5

ToDo.txt
src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp

index 3519c7c..2244052 100644 (file)
--- a/ToDo.txt
+++ b/ToDo.txt
@@ -14,7 +14,7 @@
 \r
 /* Minor feature additions */\r
 -Re-implement "InputDebounceTime"\r
--Include ThemeInfo.ini support\r
+-Include ThemeInfo.ini support (is this still needed?)\r
 -Add Windows code for network diagnostics\r
 -Implement "CustomSongsUseGraphics" (use song BG/banner, not fallbacks)\r
 \r
index 4ef98a4..033b235 100755 (executable)
@@ -20,8 +20,9 @@
 
 const CString TEMP_MOUNT_POINT = "/@mctemp/";
 
-/* the device paths apparently change between USB drivers... */
-const bool NEW_SYNTAX = system( "lsmod | grep usb_storage" ) == 0;
+/* the device paths change slightly between USB kernel modules.
+ * Assume "ub" unless this returns true, meaning "usb_storage". */
+const bool USB_STORAGE_MODULE = system( "lsmod | grep -q usb_storage" ) == 0;
 
 void GetNewStorageDevices( vector<UsbStorageDevice>& vDevicesOut );
 
@@ -309,7 +310,7 @@ void SetDeviceInfo( UsbStorageDevice &usbd, CString sPath )
                         * reassign it (i.e., assign 5th from right instead of 2nd). -- Vyhd
                         */
                        CString sHostPort;
-                       if( NEW_SYNTAX )
+                       if( USB_STORAGE_MODULE )
                                sHostPort = asBits[asBits.size()-5];
                        else
                                sHostPort = asBits[asBits.size()-2];