From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Maksim (Max) Krasnyanskiy" Date: Thu, 18 Jul 2002 21:40:01 +0000 Subject: Re: [PATCH] usb.agent should processes usermap before other Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org >>>btw How is usb.usermap supposed to be updated. It'd be nice to have >>>per-susbsytem >>>usermap. Then I could simply install bluetooth specific usermap without >>>patching >>>usb.usermap. >> >>Yes, I've been thinking the same thing. gphoto2 has it's own usermap >>which would be much more convenient if it was it's own file. > >There's some stuff that's Debian-specific just now, builting the >/etc/hotplug/usb.usermap from components installed somewhere in >the /usr tree... maybe someone should make that not be so specific >to Debian. I belive I did :). Did you miss my patch ? Here it's again. ---------- --- usb.agent.orig Thu Jul 18 01:03:23 2002 +++ usb.agent Thu Jul 18 01:11:30 2002 @@ -82,8 +82,7 @@ # config scripts (which mustn't overlap with kernel modules). Those # could change $DEVICE permissions, etc. # -MAP_USERMAP=$HOTPLUG_DIR/usb.usermap - +MAP_USERMAP_DIR=$HOTPLUG_DIR/usb # accumulates list of modules we may care about DRIVERS="" @@ -335,13 +334,17 @@ fi # some devices have user-mode drivers (no kernel module, but config) - # or specialized user-mode setup helpers - if [ -r $MAP_USERMAP ]; then + # or specialized user-mode setup helpers + MAPS="$MAP_USERMAP_DIR/usermap.*" + if [ "$MAPS" != "" ]; then MODPROBE=: - load_drivers usb $MAP_USERMAP "$LABEL" - if [ "$DRIVERS" != "" ]; then - FOUND=true - fi + for map in $MAPS; do + load_drivers usb $map "$LABEL" + if [ "$DRIVERS" != "" ]; then + FOUND=true + break + fi + done fi if [ "$FOUND" = "false" ]; then (this is just RFC, spaces are probably clobbered. I'll send real patch if people are ok with this.) /etc/hotplug/usb/usermap.bluetooth bluefw 0x0003 0x0a5c 0x2033 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 Works fine for me. Comments ? Max ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel