summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-12-25 00:33:00 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:11 -0700
commita7402175da70f53d308450b50dd0c00cb733276e (patch)
treea73db9444fc3ac735bea0a4a875727ac8fb9eab7
parenta38401d3e89f9e66039a9708fd0af33eefab7210 (diff)
[PATCH] If a LABEL rule has a BUS id, then we must check to see if the device is on a bus.
-rw-r--r--namedev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/namedev.c b/namedev.c
index de1b206180..813f26b035 100644
--- a/namedev.c
+++ b/namedev.c
@@ -473,7 +473,10 @@ static int do_label(struct sysfs_class_device *class_dev, struct udevice *udev,
if (dev->type != LABEL)
continue;
- if (sysfs_device) {
+ if (dev->bus[0] != '\0') {
+ /* as the user specified a bus, we must match it up */
+ if (!sysfs_device)
+ continue;
dbg("dev->bus='%s' sysfs_device->bus='%s'", dev->bus, sysfs_device->bus);
if (strcasecmp(dev->bus, sysfs_device->bus) != 0)
continue;