On Sat, Jun 30, 2012 at 7:15 PM, Clemens Ladisch <clemens@xxxxxxxxxx> wrote: > TEST=="vendor_name", TEST!="model_name", WAIT_FOR="$kernel.0/model_name" > TEST=="vendor_name", TEST!="model_name", TEST=="$kernel.0/model_name", \ > OPTIONS="string_escape=replace", \ > SYMLINK+="firewire/by-name/$attr{vendor_name} $attr{$kernel.0/model_name}" > > But this doesn't work, probably because $kernel is not substituted > before $attr: > > $ ls -l /dev/firewire/by-name/ > lrwxrwxrwx 1 root root 9 2012-06-30 18:13 LaCie_ -> ../../fw2 > > (It works if I use $attr{fw2.0/model_name}, but that isn't generic enough.) > > Do I have to write a separate tool for extracting the name? There is no direct support for accessing child devices, because it is too racy and the child devices usually do not even exist at the time the event for the parent device is handled. Special care in the kernel need to be taken to make all that possible, like we do for example for disks and partitions. Aside from that, why this usually does not work well, the format char replacement is just one pass from the left to the right, so that order would not work. Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html