diff options
author | arnd@arndb.de <arnd@arndb.de> | 2003-11-18 21:36:10 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:06:24 -0700 |
commit | ae2859df40ef80d15dff39fadd470a8541bab857 (patch) | |
tree | 780504d6b00037b99d711565621d4d9d524da42a /namedev.c | |
parent | 54e3a5d3ae475fadcac950d28bf69b8359212b9e (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.
Diffstat (limited to 'namedev.c')
-rw-r--r-- | namedev.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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))) |