From ae2859df40ef80d15dff39fadd470a8541bab857 Mon Sep 17 00:00:00 2001 From: "arnd@arndb.de" Date: Tue, 18 Nov 2003 21:36:10 -0800 Subject: [PATCH] [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. --- namedev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/namedev.c b/namedev.c index dc56432e6..5970ef059 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))) -- 2.30.2