From: Mark B. <mar...@gm...> - 2011-11-18 20:32:23
|
On Fri, Nov 18, 2011 at 11:29 AM, Iain Paton <sel...@gm...> wrote: > Hi, > > Not sure if there's been sysfs changes since this was written, or possibly > my kernel is > just too new. I'm running svn r3905 with a 3.1 kernel and the qlogic > target driver. > > Anyway, $$attributes{'host'}->{'value'} is just something like 'host6' on > my > system and the current dir will not be /sys/class/fc_host so _issueLip > just silently fails. > > Tagging /sys/class/fc_host/ onto the start of the string in the following > two places fixes it for me. > > Iain > > > --- scstadmin.org 2011-11-18 16:08:40.693494749 +0000 > +++ scstadmin 2011-11-18 16:11:13.088507350 +0000 > @@ -5000,7 +5000,7 @@ > > my $dir = new IO::Handle; > > - if (!(opendir $dir, > $$attributes{'host'}->{'value'}.'/device/fc_host')) { > + if (!(opendir $dir, > "/sys/class/fc_host/".$$attributes{'host'}->{'value'}.'/device/fc_host')) { > #print "\t-> Driver/target is not a fibre channel target, > ignoring.\n"; > return FALSE; > } > @@ -5008,7 +5008,7 @@ > foreach my $host (readdir($dir)) { > next if (($host eq '.') || ($host eq '..')); > > - my $lip = > $$attributes{'host'}->{'value'}.'/device/fc_host/'.$host.'/issue_lip'; > + my $lip = > "/sys/class/fc_host/".$$attributes{'host'}->{'value'}.'/device/fc_host/'.$host.'/issue_lip'; > > if (-w $lip) { > my $io = new IO::File $lip, O_WRONLY; > > Fixed, thanks. - Mark. |