summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-10-07 09:32:28 -0700
committerGravatar Matt Colyer2008-10-07 09:32:28 -0700
commit12b128bcdb67f7427c1e216ec6f42c45281bfccf (patch)
tree2cf4ddd9dac4a2fc87c728a93cbe34c34dc3040c /data
downloadifuse-12b128bcdb67f7427c1e216ec6f42c45281bfccf.tar.gz
ifuse-12b128bcdb67f7427c1e216ec6f42c45281bfccf.tar.bz2
Initial commit.
Diffstat (limited to 'data')
-rw-r--r--data/30-ifuse.fdi44
-rwxr-xr-xdata/hal-iphone-setup22
2 files changed, 66 insertions, 0 deletions
diff --git a/data/30-ifuse.fdi b/data/30-ifuse.fdi
new file mode 100644
index 0000000..63c7afb
--- /dev/null
+++ b/data/30-ifuse.fdi
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deviceinfo version="0.2">
+ <device>
+ <match key="info.subsystem" string="usb">
+ <match key="usb.vendor_id" int="0x5ac">
+ <match key="usb.product_id" int="0x1290">
+ <!-- This is here to only connect the first time -->
+ <match key="@info.parent:usb_device.configuration_value" int="1">
+ <append key="info.capabilities" type="strlist">block</append>
+ <append key="info.capabilities" type="strlist">volume</append>
+ <append key="info.capabilities" type="strlist">storage</append>
+ <merge key="info.category" type="string">storage</merge>
+ <append key="block.device" type="copy_property">@info.parent:linux.device_file</append>
+ <merge key="@info.parent:usb_device.configuration_value" type="int">3</merge>
+ <merge key="storage.bus" type="string">usb</merge>
+ <merge key="storage.drive_type" type="string">disk</merge>
+ <merge key="block.storage_device" type="copy_property">@info.udi:info.udi</merge>
+ <merge key="storage.removable" type="bool">true</merge>
+ <merge key="storage.requires_eject" type="bool">false</merge>
+ <merge key="storage.hotpluggable" type="bool">false</merge>
+ <merge key="storage.media_check_enabled" type="bool">false</merge>
+ <merge key="storage.automount_enabled_hint" type="bool">true</merge>
+ <merge key="storage.no_partitions_hint" type="bool">true</merge>
+ <merge key="storage.model" type="string">iPhone</merge>
+ <merge key="storage.vendor" type="string">Apple Computer, Inc.</merge>
+ <merge key="storage.orginating_device" type="copy_property">@info.udi:info.udi</merge>
+ <merge key="block.is_volume" type="bool">false</merge>
+ <merge key="block.no_partitions" type="bool">true</merge>
+ <merge key="block.have_scanned" type="bool">false</merge>
+ <append key="volume.fstype" type="string">ifuse</append>
+ <append key="volume.fsusage" type="string">filesystem</append>
+ <append key="volume.mount_point" type="string"></append>
+ <append key="volume.label" type="string">iPhone</append>
+ <append key="volume.uuid" type="string"></append>
+ <merge key="volume.is_disc" type="bool">false</merge>
+ <merge key="volume.is_mounted" type="bool">false</merge>
+ <merge key="volume.is_partition" type="bool">false</merge>
+ <merge key="volume.is_device_mapper" type="bool">false</merge>
+ </match>
+ </match>
+ </match>
+ </match>
+ </device>
+</deviceinfo>
diff --git a/data/hal-iphone-setup b/data/hal-iphone-setup
new file mode 100755
index 0000000..a6cffe6
--- /dev/null
+++ b/data/hal-iphone-setup
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# borrowed from Fedora and modified to apply device major and minor nodes to the iPhone
+#
+
+hal_set () {
+ if [ -n "$2" ]; then
+ /usr/bin/hal-set-property --udi "$UDI" --key block.$1 --int "$2"
+ else
+ /usr/bin/hal-set-property --udi "$UDI" --key block.$1 --remove
+ fi
+}
+
+DEVICE_NODE=`hal-get-property --udi "$UDI" --key block.device`
+
+echo $DEVICE_NODE
+
+MAJOR=`stat $DEVICE_NODE --format="%t"`
+MINOR=`stat $DEVICE_NODE --format="%T"`
+
+hal_set major 0x$MAJOR
+hal_set minor 0x$MINOR