mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 21:26:31 +00:00
scstadmin: Sort output of -list_* options alphabetically
Making the output of these options predictable is necessary because a later patch will add regression tests for the -list_* options. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7930 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -556,6 +556,7 @@ sub drivers {
|
||||
push @drivers, $driver;
|
||||
}
|
||||
}
|
||||
@drivers = sort(@drivers);
|
||||
close $dHandle;
|
||||
} else {
|
||||
return (undef, "drivers(): Unable to read directory '$_path': $!");
|
||||
@@ -3834,6 +3835,8 @@ sub handlers {
|
||||
|
||||
close $hHandle;
|
||||
|
||||
@handlers = sort(@handlers);
|
||||
|
||||
return (\@handlers, undef);
|
||||
}
|
||||
|
||||
|
||||
@@ -3062,7 +3062,7 @@ sub listHandler {
|
||||
};
|
||||
print "\n";
|
||||
|
||||
foreach my $handler (keys %toprint) {
|
||||
foreach my $handler (sort keys %toprint) {
|
||||
my ($devices, $errorString) = $SCST->devicesByHandler($handler);
|
||||
my $first = TRUE;
|
||||
|
||||
@@ -3070,7 +3070,7 @@ sub listHandler {
|
||||
push @{$devices}, '-';
|
||||
}
|
||||
|
||||
foreach my $device (@{$devices}) {
|
||||
foreach my $device (sort @{$devices}) {
|
||||
if ($first) {
|
||||
printf("\t%-*s %-*s\n", $l_handler, $handler, $l_device, $device);
|
||||
$first = FALSE;
|
||||
@@ -3343,7 +3343,7 @@ sub listTargets {
|
||||
|
||||
my %p;
|
||||
|
||||
foreach my $driver (keys %toprint) {
|
||||
foreach my $driver (sort keys %toprint) {
|
||||
my ($targets, $errorString) = $SCST->targets($driver);
|
||||
|
||||
foreach my $target (@{$targets}) {
|
||||
@@ -3739,7 +3739,7 @@ sub listHandlerAttributes {
|
||||
print "\n\tDevice CREATE attributes available\n";
|
||||
print "\t----------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
|
||||
@@ -3765,7 +3765,7 @@ sub listDriverAttributes {
|
||||
print "\n\tDynamic attributes available\n";
|
||||
print "\t----------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
@@ -3778,7 +3778,7 @@ sub listDriverAttributes {
|
||||
print "\n\tTarget CREATE attributes available:\n";
|
||||
print "\t-----------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
@@ -3811,7 +3811,7 @@ sub listTargetAttributes {
|
||||
print "\n\tDynamic attributes available\n";
|
||||
print "\t----------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
}
|
||||
@@ -3825,7 +3825,7 @@ sub listTargetAttributes {
|
||||
print "\n\tLUN CREATE attributes available\n";
|
||||
print "\t-------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
|
||||
@@ -3858,7 +3858,7 @@ sub listGroupAttributes {
|
||||
print "\n\tLUN CREATE attributes available\n";
|
||||
print "\t-------------------------------\n";
|
||||
|
||||
foreach my $attribute (keys %{$attributes}) {
|
||||
foreach my $attribute (sort keys %{$attributes}) {
|
||||
print "\t$attribute\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user