summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarnd@arndb.de <arnd@arndb.de>2003-11-18 21:36:10 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:06:24 -0700
commitae2859df40ef80d15dff39fadd470a8541bab857 (patch)
tree780504d6b00037b99d711565621d4d9d524da42a
parent54e3a5d3ae475fadcac950d28bf69b8359212b9e (diff)
[PATCH] add bus id modifier
On Tuesday 18 November 2003 02:14, Greg KH wrote: > On Mon, Nov 17, 2003 at 06:33:32PM +0100, Arnd Bergmann wrote: > > That would at least be part of the solution I'm looking for. How about > > extra format characters for bus_id and for the result of a callout > > program? > > Sure, I can see the use for that. Want to send a patch? :) > Take a look at the current bk tree (which has moved to > bk://linuxusb.bkbits.net/udev/ ) I've made finding that device a lot > easier now, and it works for all rule types. Great, just what I was missing. I didn't see the any link to the bk repository. Here's the patch for the bus_id. I'll need to think about the handling of callout results a bit more.
-rw-r--r--namedev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/namedev.c b/namedev.c
index dc56432e67..5970ef0590 100644
--- a/namedev.c
+++ b/namedev.c
@@ -822,6 +822,13 @@ done:
strcpy(name, pos+2);
*pos = 0x00;
switch (pos[1]) {
+ case 'b':
+ if (!sysfs_device)
+ break;
+ strcat(udev->name, sysfs_device->bus_id);
+ dbg("bus_id appended: %s",
+ sysfs_device->bus_id);
+ break;
case 'n':
dig = class_dev->name + strlen(class_dev->name);
while (isdigit(*(dig-1)))