From: arnd@arndb.de Date: Wed, 19 Nov 2003 05:36:10 +0000 (-0800) Subject: [PATCH] add bus id modifier X-Git-Tag: 006~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae2859df40ef80d15dff39fadd470a8541bab857;p=systemd [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. --- diff --git a/namedev.c b/namedev.c index dc56432e..5970ef05 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)))