diff --git a/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm b/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm index f0f6d2d05..947ba1a36 100644 --- a/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm +++ b/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm @@ -2824,6 +2824,19 @@ sub targetAttributes { $linked =~ s/.*\///; $attributes{$attribute}->{'static'} = TRUE; $attributes{$attribute}->{'value'} = $linked; + } elsif ($driver eq 'scst_local' && $attribute eq 'sessions') { + my $_session_path = make_path($_path, $attribute); + my $pSessHandle = new IO::Handle; + if (!(opendir $pSessHandle, $_session_path)) { + $self->{'err_string'} = "targetAttributes(): Unable to read directory '$_session_path': $!"; + return undef; + } + my $session_name; + foreach my $e (readdir($pSessHandle)) { + next if ($e eq '.' || $e eq '..'); + $session_name = $e; + } + $attributes{'session_name'}->{'keys'}->{'0'}->{'value'} = $session_name; } elsif (-d $pPath) { # Skip directories } else {