[maemo-commits] [maemo-commits] r19509 - in projects/haf/tags/ke-recv/3.19-12: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Nov 19 13:21:33 EET 2009
Author: kihamala
Date: 2009-11-19 13:21:21 +0200 (Thu, 19 Nov 2009)
New Revision: 19509

Modified:
   projects/haf/tags/ke-recv/3.19-12/debian/changelog
   projects/haf/tags/ke-recv/3.19-12/src/ke-recv.c
   projects/haf/tags/ke-recv/3.19-12/src/osso-usb-mass-storage-enable.sh
Log:
fix


Modified: projects/haf/tags/ke-recv/3.19-12/debian/changelog
===================================================================
--- projects/haf/tags/ke-recv/3.19-12/debian/changelog	2009-11-18 12:07:47 UTC (rev 19508)
+++ projects/haf/tags/ke-recv/3.19-12/debian/changelog	2009-11-19 11:21:21 UTC (rev 19509)
@@ -1,3 +1,11 @@
+ke-recv (3.19-12) unstable; urgency=low
+
+  David Kedves:
+  * Fixes: NB#146099 - Not displaying the "Connected to USB device" dialog
+    when USB is inserted and mounts the device/mmc memory by default
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Mon, 16 Nov 2009 11:22:41 +0200
+
 ke-recv (3.19-11) unstable; urgency=low
 
   Felipe:

Modified: projects/haf/tags/ke-recv/3.19-12/src/ke-recv.c
===================================================================
--- projects/haf/tags/ke-recv/3.19-12/src/ke-recv.c	2009-11-18 12:07:47 UTC (rev 19508)
+++ projects/haf/tags/ke-recv/3.19-12/src/ke-recv.c	2009-11-19 11:21:21 UTC (rev 19509)
@@ -3005,7 +3005,8 @@
                                 usb_state_t orig = usb_state;
                                 usb_state = S_MASS_STORAGE;
                                 if (!e_plugged_helper()) {
-                                        ULOG_DEBUG_F("no card was USB shared");
+                                        ULOG_DEBUG_F("no card was USB shared"
+                                                     " or cable disconnected");
                                         /* no real state change if no card was
                                          * successful */
                                         usb_state = orig;

Modified: projects/haf/tags/ke-recv/3.19-12/src/osso-usb-mass-storage-enable.sh
===================================================================
--- projects/haf/tags/ke-recv/3.19-12/src/osso-usb-mass-storage-enable.sh	2009-11-18 12:07:47 UTC (rev 19508)
+++ projects/haf/tags/ke-recv/3.19-12/src/osso-usb-mass-storage-enable.sh	2009-11-19 11:21:21 UTC (rev 19509)
@@ -65,6 +65,18 @@
     exit 1
 fi
 
+LUN0='/sys/devices/platform/musb_hdrc/gadget/gadget-lun0/file'
+LUN1='/sys/devices/platform/musb_hdrc/gadget/gadget-lun1/file'
+
+/bin/grep /sys/devices/platform/musb_hdrc/mode -e idle > /dev/null
+if [ $? = 0 ]; then
+    logger "$0: usb cable detached after module change"
+    # make sure we don't have devices in there
+    echo '' > $LUN0
+    echo '' > $LUN1
+    exit 1
+fi
+
 initctl emit --no-wait G_FILE_STORAGE_READY
 
 if [ $# -gt 1 ]; then
@@ -72,9 +84,6 @@
     exit 1
 fi
 
-LUN0='/sys/devices/platform/musb_hdrc/gadget/gadget-lun0/file'
-LUN1='/sys/devices/platform/musb_hdrc/gadget/gadget-lun1/file'
-
 # check first if the card(s) are already shared
 if [ $# = 1 ]; then
     FOUND=0

More information about the maemo-commits mailing list