mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scstadmin: Align exports columns properly
An example:
# scstadmin -noprompt -handler vdisk_fileio -close_dev diskf0
Collecting current configuration: done.
-> Making requested changes.
Device 'diskf0' is currently in use by the following:
Driver Target Group Lun
--------------------------------------------
iscsi iqn.2012-06.be.bva:tgt1 61
scst_local disks 1
FATAL: Received the following error:
Device 'diskf0' still in use, aborting. Use -force to override.
This patch is based on a proposal from Dzmitry Kotsikau.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3556,9 +3556,9 @@ sub listExported {
|
||||
if (keys %{$$attributes{'exported'}}) {
|
||||
my $exported = $$attributes{'exported'}->{'value'};
|
||||
|
||||
my $l_driver;
|
||||
my $l_target;
|
||||
my $l_group;
|
||||
my $l_driver = length('Driver');
|
||||
my $l_target = length('Target');
|
||||
my $l_group = length('Group');
|
||||
|
||||
foreach my $driver (keys %{$exported}) {
|
||||
$l_driver = length($driver)
|
||||
@@ -3579,9 +3579,7 @@ sub listExported {
|
||||
printf("\t%-*s %-*s %-*s %-4s\n", $l_driver, 'Driver', $l_target, 'Target',
|
||||
$l_group, 'Group', 'Lun');
|
||||
print "\t";
|
||||
for (my $x = 0; $x < ($l_driver + $l_target + $l_group + 5); $x++) {
|
||||
print "-";
|
||||
}
|
||||
print join("", "-" x ($l_driver + $l_target + $l_group + 6));
|
||||
print "\n";
|
||||
|
||||
foreach my $driver (sort keys %{$exported}) {
|
||||
|
||||
Reference in New Issue
Block a user