commit 99938096229ec6259e7586bfb94a371db5381887 Author: Christophe Fergeau <cferg...@redhat.com> Date: Sun Jul 17 09:20:06 2011 +0200
udev: rework udev rule to handle Shuffle 4g Some iPod Shuffle (4G) don't have a partition, only a filesystem on the block device. The current rule won't match for such iPods because it wants a partition. Given that some Nano5g have been seen as reporting a filesystem on the block device while they have a partition, we don't want to run the rule unconditionally on any block device or partition. So we add an additional rule which matches devices with a partition, but with a check for ID_PART_TABLE_TYPE. if it's empty, it means we only have a block device, in which case we can run the callout. This bug was fixed thanks to eshat's investigations on IRC. tools/90-libgpod.rules.in | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) --- diff --git a/tools/90-libgpod.rules.in b/tools/90-libgpod.rules.in index 2c312bb..a1c8e16 100644 --- a/tools/90-libgpod.rules.in +++ b/tools/90-libgpod.rules.in @@ -3,7 +3,17 @@ # 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}" +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}", GOTO="libgpod_end" + +# Some iPod Shuffle (4G) don't have a partition, only a filesystem on the +# block device. The rule above won't match for such iPods because it wants +# a partition. And given that some Nano5g have been seen as reporting a +# filesystem on the block device while they have a partition, we don't want +# to run the rule below unconditionally. So we add a check for +# ID_PART_TABLE_TYPE, if it's empty, it means we only have a block device, +# in which case we can run the callout +ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", ENV{DEVTYPE}=="disk", ENV{ID_PART_TABLE_TYPE}!="?*", ATTRS{idVendor}=="05ac", ENV{ID_MODEL}=="iPod", IMPORT{program}="@udevdir@/ipod-set-info $tempnode $attr{busnum} $attr{devnum}", GOTO="libgpod_end" + # "iPods" using the afc protocol (iPhone, iPod Touch, ...) ACTION=="add|change", ENV{USBMUX_SUPPORTED}=="1", IMPORT{program}+="@udevdir@/iphone-set-info", GOTO="libgpod_end" ------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2