scstadmin: Make -list_ttgt_attr and -set_ttgt_attr work for local target ports

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-11-13 21:16:37 +00:00
parent 4f31d1cc0e
commit ff73c5cb2e
2 changed files with 4 additions and 3 deletions

View File

@@ -3591,11 +3591,12 @@ sub targetGroupTargetAttributes {
my $group = shift;
my $tgroup = shift;
my $tgt = shift;
my $local_tgt = shift;
my %attributes;
my $pHandle = new IO::Handle;
my $_path = make_path(SCST_DEV_GROUP_DIR(), $group, SCST_DG_TGROUPS, $tgroup, $tgt);
if (-l $_path) {
if (-l $_path && !$local_tgt) {
return \%attributes;
}

View File

@@ -3754,7 +3754,7 @@ sub listTargetGroupTargetAttributes {
my $tgt = shift;
my $nonkey = shift;
my $attributes = $SCST->targetGroupTargetAttributes($group, $tgroup, $tgt);
my $attributes = $SCST->targetGroupTargetAttributes($group, $tgroup, $tgt, TRUE);
return TRUE if issueWarning($SCST->errorString());
@@ -4082,7 +4082,7 @@ sub setTargetGroupTargetAttributes {
my $error = "\t-> WARNING: Target '$group/$tgroup/$tgt' lacks the settable attribute '%s', ignoring.\n\n";
my $_attributes = $SCST->targetGroupTargetAttributes($group, $tgroup, $tgt);
my $_attributes = $SCST->targetGroupTargetAttributes($group, $tgroup, $tgt, TRUE);
return TRUE if issueWarning($SCST->errorString());