From 1496822b6be9857a16e8e7135c42927b8b348e0c Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Thu, 26 Mar 2009 09:18:31 -0700 Subject: Make automounting actually work. [#3 state:resolved] --- Makefile.am | 2 +- configure.ac | 2 +- data/30-ifuse.fdi | 54 --------------------------------------------------- data/Makefile.am | 4 ---- data/hal-iphone-setup | 22 --------------------- fdi/30-ifuse.fdi | 41 ++++++++++++++++++++++++++++++++++++++ fdi/Makefile.am | 3 +++ src/Makefile.am | 2 +- src/ifuse.c | 1 + 9 files changed, 48 insertions(+), 83 deletions(-) delete mode 100644 data/30-ifuse.fdi delete mode 100644 data/Makefile.am delete mode 100755 data/hal-iphone-setup create mode 100644 fdi/30-ifuse.fdi create mode 100644 fdi/Makefile.am diff --git a/Makefile.am b/Makefile.am index 27732b8..a6161ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = src data +SUBDIRS = src fdi indent: indent -kr -ut -ts4 -l120 src/*.c diff --git a/configure.ac b/configure.ac index 0fc8d09..1598675 100644 --- a/configure.ac +++ b/configure.ac @@ -37,4 +37,4 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) -AC_OUTPUT(Makefile src/Makefile data/Makefile) +AC_OUTPUT(Makefile src/Makefile fdi/Makefile) diff --git a/data/30-ifuse.fdi b/data/30-ifuse.fdi deleted file mode 100644 index 51ea028..0000000 --- a/data/30-ifuse.fdi +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - block - storage - hal-iphone-setup - storage - usb - disk - true - true - false - false - false - true - true - iPhone - Apple Computer, Inc. - /org/freedesktop/Hal/devices/computer - @info.udi:linux.device_file - @info.parent:info.udi - - - - - - - - - camera - block - volume - volume - hal-iphone-setup - @info.parent:linux.device_file - @info.parent:info.udi - true - true - false - fuse.ifuse - allow_other - filesystem - iPhone - - - - - - - - diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index f9302c4..0000000 --- a/data/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -freedesktopfdidir = $(prefix)/share/hal/fdi/information/20thirdparty/ -freedesktopfdi_DATA = 30-ifuse.fdi - -bin_SCRIPTS = hal-iphone-setup diff --git a/data/hal-iphone-setup b/data/hal-iphone-setup deleted file mode 100755 index a6cffe6..0000000 --- a/data/hal-iphone-setup +++ /dev/null @@ -1,22 +0,0 @@ -#!/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 diff --git a/fdi/30-ifuse.fdi b/fdi/30-ifuse.fdi new file mode 100644 index 0000000..a801720 --- /dev/null +++ b/fdi/30-ifuse.fdi @@ -0,0 +1,41 @@ + + + + + + + + block + storage + false + true + true + iPhone + Apple Computer, Inc. + /org/freedesktop/Hal/devices/computer + @info.udi:linux.device_file + @info.parent:info.udi + + + + + + + + + + block + volume + @info.parent:linux.device_file + @info.parent:info.udi + fuse.ifuse + filesystem + iPhone + + + + + + + + diff --git a/fdi/Makefile.am b/fdi/Makefile.am new file mode 100644 index 0000000..8cd58d4 --- /dev/null +++ b/fdi/Makefile.am @@ -0,0 +1,3 @@ +freedesktopfdidir=$(prefix)/share/hal/fdi/information/20thirdparty +freedesktopfdi_DATA=30-ifuse.fdi + diff --git a/src/Makefile.am b/src/Makefile.am index b0ea5d5..17798c6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ AM_CFLAGS = $(libglib2_CFLAGS) $(libfuse_CFLAGS) $(libiphone_CFLAGS) -g AM_LDFLAGS = $(libglib2_LIBS) $(libfuse_LIBS) $(libiphone_LIBS) -rootsbinexecdir = $(sbindir) +rootsbinexecdir = /sbin rootsbinexec_PROGRAMS = mount.fuse.ifuse mount_fuse_ifuse_SOURCES = ifuse.c diff --git a/src/ifuse.c b/src/ifuse.c index f2acc78..5677cbc 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -351,6 +351,7 @@ int main(int argc, char *argv[]) if (fuse_opt_parse(&args, NULL, NULL, ifuse_opt_proc) == -1) { return -1; } + fuse_opt_add_arg(&args, "-oallow_other"); if (argc < 2) { fprintf(stderr, "A path to the USB device must be specified\n"); -- cgit v1.1-32-gdbae