if (dev->type != CALLOUT)
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;
EOF
},
{
- desc => "callout for device with no bus",
+ desc => "invalid callout for device with no bus",
subsys => "tty",
devpath => "class/tty/console",
expected => "TTY" ,
conf => <<EOF
CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n foo", ID="foo", NAME="foo"
REPLACE, KERNEL="console", NAME="TTY"
+EOF
+ },
+ {
+ desc => "valid callout for device with no bus",
+ subsys => "tty",
+ devpath => "class/tty/console",
+ expected => "foo" ,
+ conf => <<EOF
+CALLOUT, PROGRAM="/bin/echo -n foo", ID="foo", NAME="foo"
EOF
},
{