commit 5dd8277c86e22c1d8768677bde50c7f988194c6b
Author: Christophe Fergeau <cferg...@mandriva.com>
Date:   Sun Feb 14 21:18:56 2010 +0100

    [udev] make udev rule more strict
    
    The nano5g has its block device and its partition which are both
    identified by udev as containing a valid filesystem. However, only
    the partition has an actual filesystem on it, not the block device.
    Make sure the udev rule is only ran on the nano5g partition and not
    on the block device.

 tools/libgpod.rules.in |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tools/libgpod.rules.in b/tools/libgpod.rules.in
index feeb589..0cc477a 100644
--- a/tools/libgpod.rules.in
+++ b/tools/libgpod.rules.in
@@ -1,5 +1,9 @@
 # iPods showing up as mass storage devices
-ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", 
ATTRS{idVendor}=="05ac", ENV{ID_MODEL}=="iPod", 
IMPORT{program}="@udevdir@/ipod-set-info $tempnode $attr{busnum} $attr{devnum}"
+# we check if the current node is a partition even if that may seem useless
+# because the nano5g have data on the block device making it look like a 
+# FAT32 filesystem while it's not (ie can't be mounted). The first
+# partition on the iPod is what should be mounted.
+ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", 
ENV{DEVTYPE}=="partition", ATTRS{idVendor}=="05ac", ENV{ID_MODEL}=="iPod", 
IMPORT{program}="@udevdir@/ipod-set-info $tempnode $attr{busnum} $attr{devnum}"
 
 # "iPods" using the afc protocol (iPhone, iPod Touch, ...)
 ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", 
ATTR{idProduct}=="129[0-9]", IMPORT{program}+="@udevdir@/iphone-set-info"

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to