From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Date: Thu, 20 Nov 2003 20:14:43 +0000 Subject: Re: [udev] support arguments in callout exec 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 On Friday 21 November 2003 07:53, Greg KH wrote: > On Thu, Nov 20, 2003 at 01:47:36AM +0100, Arnd Bergmann wrote: > > CALLOUT, PROGRAM="sh -c 'echo ${DEVPATH} | tr a-z A-Z'", BUS="usb", > > ID="XXX", NAME="webcam%n" > > Oh come on, why not just make that into a simple script, we're trying to > keep udev simple :) Ok, that makes sense. > > To take that even further, do you think it might be a good idea to > > preprocess the string in the same way as the NAME= argument, allowing > > e.g. PROGRAM="/bin/devname %b %M:%m" ? > > Hm, good idea. > > Someone else also proposed adding a number modifier to the %b field to > pick out a specific character from a bus id. Anyone have any thoughts > about this? Personally, I think it will be a bit hard to handle bus ids > that are not fixed widths all the time, but might be handy to try to > implement a devfs-like udev config file. When we allow %b in PROGRAM= and find a good way to use the output of the program as the device name, there won't be any need for such a hack, as it can better be done in an external script. Getting it right in udev would be too complicated IMHO (both usage and implementation). Arnd <>< ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ 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