From d6053c491b548f9274f9330df349b199501f0f4b Mon Sep 17 00:00:00 2001 From: Mark Buechler Date: Tue, 15 Jun 2010 15:08:39 +0000 Subject: [PATCH] - Changes to scstadmin.sysfs necessary for the recent module changes. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1771 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/scstadmin.sysfs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scstadmin/scstadmin.sysfs b/scstadmin/scstadmin.sysfs index 6406de094..819976fa0 100755 --- a/scstadmin/scstadmin.sysfs +++ b/scstadmin/scstadmin.sysfs @@ -1231,7 +1231,7 @@ sub checkConfiguration { foreach my $target (keys %{$$CONFIG{'TARGET_DRIVER'}->{$driver}->{'TARGET'}}) { if (!defined($CURRENT{'assign'}->{$driver}->{$target})) { print "\t-> WARNING: Target '$target' for driver '$driver' ". - "does not exist.\n" if ($SCST->driverIsStatic($driver)); + "does not exist.\n" if ($SCST->driverIsVirtualCapable($driver)); } } } @@ -1424,12 +1424,12 @@ sub applyTargetAssignments { foreach my $target (sort keys %{$targets}) { if (!defined($CURRENT{'assign'}->{$driver}->{$target})) { - if ($SCST->driverIsStatic($driver)) { + if ($SCST->driverIsVirtualCapable($driver)) { immediateExit("Target '$target' for driver '$driver' does not exist."); } else { # TODO: Add $attributes print "-> Creating target '$target' for driver '$driver': "; - my $rc = $SCST->addTarget($driver, $target); + my $rc = $SCST->addVirtualTarget($driver, $target); print "done.\n"; immediateExit($SCST->errorString($rc)) if ($rc); @@ -2032,9 +2032,9 @@ sub setDriverAttributes { # Maybe we can add it.. my $value = $$attributes{$attribute}; my $rc = 1; - if (!$SCST->driverIsStatic($driver)) { + if (!$SCST->driverIsVirtualCapable($driver)) { print "-> Attempting to add driver attribute '$attribute' with value '$value' for driver '$driver': "; - $rc = $SCST->addDriverAttribute($driver, $attribute, $value); + $rc = $SCST->addDriverDynamicAttribute($driver, $attribute, $value); print "done.\n"; } @@ -2108,9 +2108,9 @@ sub setTargetAttributes { # Maybe we can add it.. my $value = $$attributes{$attribute}; my $rc = 1; - if (!$SCST->driverIsStatic($driver)) { + if (!$SCST->driverIsVirtualCapable($driver)) { print "-> Attempting to add driver attribute '$attribute' with value '$value' for driver/target '$driver/$target': "; - $rc = $SCST->addTargetAttribute($driver, $target, $attribute, $value); + $rc = $SCST->addTargetDynamicAttribute($driver, $target, $attribute, $value); print "done.\n"; } @@ -2136,7 +2136,7 @@ sub checkTargetKeyAttributes { } if (!$found) { - my $rc = $SCST->addTargetAttribute($driver, $target, $attribute, $value); + my $rc = $SCST->addTargetDynamicAttribute($driver, $target, $attribute, $value); print "-> WARNING: Unable to add attribute '$attribute' with value ". "'$value' to driver/target '$driver/$target': ".$SCST->errorString($rc)."\n" if ($rc);