From 140c5af41c2deb74aced4b7ede3b5b0bf07e77b5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 10 Oct 2013 15:02:25 +0000 Subject: [PATCH] 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 --- scstadmin/scstadmin.sysfs/scstadmin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 93c2f106e..03fd328c4 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -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}}) {