mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
- List create attributes in -list_hnd_attr, -list_tgt_attr and -list_grp_attr.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3180,7 +3180,7 @@ sub initiatorCreateAttributes {
|
||||
}
|
||||
|
||||
my $io = new IO::File mkpath(SCST_ROOT, SCST_TARGETS, $driver, $target,
|
||||
SCST_GROUPS, $group, SCST_LUNS, SCST_MGMT_IO), O_RDONLY;
|
||||
SCST_GROUPS, $group, SCST_INITIATORS, SCST_MGMT_IO), O_RDONLY;
|
||||
|
||||
if (!$io) {
|
||||
$self->{'err_string'} = "initiatorCreateAttributes(): Unable to open initiators mgmt ".
|
||||
|
||||
@@ -2535,7 +2535,20 @@ sub listHandlerAttributes {
|
||||
return;
|
||||
}
|
||||
|
||||
return listAttributes($attributes, $nonkey);
|
||||
my $rc = listAttributes($attributes, $nonkey);
|
||||
return $rc if $rc;
|
||||
|
||||
$attributes = $SCST->deviceCreateAttributes($handler);
|
||||
|
||||
return if issueWarning($SCST->errorString());
|
||||
return if (!scalar keys %{$attributes});
|
||||
|
||||
print "\n\tDevice CREATE attributes available\n";
|
||||
print "\t----------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub listDriverAttributes {
|
||||
@@ -2551,7 +2564,22 @@ sub listDriverAttributes {
|
||||
return;
|
||||
}
|
||||
|
||||
return listAttributes($attributes, $nonkey);
|
||||
my $rc = listAttributes($attributes, $nonkey);
|
||||
return $rc if ($rc);
|
||||
|
||||
if ($SCST->driverIsVirtualCapable($driver)) {
|
||||
my $attributes = $SCST->targetCreateAttributes($driver);
|
||||
|
||||
return if issueWarning($SCST->errorString());
|
||||
return if (!scalar keys %{$attributes});
|
||||
|
||||
print "\n\tTarget CREATE attributes available:\n";
|
||||
print "\t-----------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub listTargetAttributes {
|
||||
@@ -2568,7 +2596,20 @@ sub listTargetAttributes {
|
||||
return;
|
||||
}
|
||||
|
||||
return listAttributes($attributes, $nonkey);
|
||||
my $rc = listAttributes($attributes, $nonkey);
|
||||
return $rc if $rc;
|
||||
|
||||
$attributes = $SCST->lunCreateAttributes($driver, $target);
|
||||
|
||||
return if issueWarning($SCST->errorString());
|
||||
return if (!scalar keys %{$attributes});
|
||||
|
||||
print "\n\tLUN CREATE attributes available\n";
|
||||
print "\t-------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub listGroupAttributes {
|
||||
@@ -2586,7 +2627,32 @@ sub listGroupAttributes {
|
||||
return;
|
||||
}
|
||||
|
||||
return listAttributes($attributes, $nonkey);
|
||||
my $rc = listAttributes($attributes, $nonkey);
|
||||
return $rc if $rc;
|
||||
|
||||
$attributes = $SCST->lunCreateAttributes($driver, $target, $group);
|
||||
|
||||
return if issueWarning($SCST->errorString());
|
||||
return if (!scalar keys %{$attributes});
|
||||
|
||||
print "\n\tLUN CREATE attributes available\n";
|
||||
print "\t-------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
|
||||
$attributes = $SCST->initiatorCreateAttributes($driver, $target, $group);
|
||||
|
||||
return if issueWarning($SCST->errorString());
|
||||
return if (!scalar keys %{$attributes});
|
||||
|
||||
print "\n\tInitiator CREATE attributes available\n";
|
||||
print "\t-------------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub listLunAttributes {
|
||||
|
||||
Reference in New Issue
Block a user