From 98bbc835f584ed6792e895519326cc637f64f411 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Mon, 28 Mar 2005 11:22:17 +0200 Subject: [PATCH] [PATCH] read %s{}-sysfs values at any device in the chain --- test/udev-test.pl | 9 +++++++++ udev_rules.c | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/test/udev-test.pl b/test/udev-test.pl index 5d7c5e5b8..ed94629dd 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1222,6 +1222,15 @@ EOF exp_name => "sane", rules => < "read sysfs value from device down in the chain", + subsys => "block", + devpath => "/class/tty/ttyUSB0", + exp_name => "serial-0000:00:09.0", + rules => <path); + if (find_sysfs_attribute(NULL, parent_device, attr, temp2, sizeof(temp2)) == 0) + break; + parent_device = sysfs_get_device_parent(parent_device); + } + if (!parent_device) + break; } /* strip trailing whitespace of sysfs value */ i = strlen(temp2); -- 2.30.2