scstadmin: Set hardware target attributes correctly

For target drivers that support creating targets, e.g. the Emulex
FC driver, it is possible that a target attribute is both writable
for existing (hardware) targets and that it has to be specified
when creating a (virtual) target. Make sure that scstadmin sets
these attributes for existing (hardware) targets when restoring a
configuration.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-10-10 15:02:25 +00:00
parent 813a97afc3
commit 140c5af41c

View File

@@ -2512,7 +2512,9 @@ sub applyTargetAssignments {
}
my $attributes = configToAttr(\%_attributes);
filterCreateAttributes($possible, $attributes, TRUE);
if ($SCST->targetType($driver, $target) == $SCST::SCST::TGT_TYPE_VIRTUAL) {
filterCreateAttributes($possible, $attributes, TRUE);
}
$changes += setTargetAttributes($driver, $target, $attributes, $deletions);
foreach my $item (keys %{$$targets{$target}}) {