span_types: Fix bug that would prevent matching on devpath.
authorShaun Ruffell <sruffell@digium.com>
Tue, 26 Nov 2013 02:21:14 +0000 (20:21 -0600)
committerShaun Ruffell <sruffell@digium.com>
Mon, 25 Nov 2013 22:11:37 +0000 (16:11 -0600)
commite298eb1237b63834c00020263f14fc788500c60c
tree88c36044b27f1fef9f529bcd2b701461daeb720c
parenta97d373d953647efe749376c92d703da868bcd0f
span_types: Fix bug that would prevent matching on devpath.

If a configuration file was specified that used the devpath, like:

  # Device: [] @Board_ID_Switch_0 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 1:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 2:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 3:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 4:E1

Then the span_types script would silently fail to match the configuration lines
for the device and silently fail to change the linemodes.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>
span_types