summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-14 16:42:45 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-14 16:42:45 +0000
commitea1c93402dfa2aba19ab3dbc3551cd21572affb9 (patch)
treeec45ca3dd1f9c2899748fabe19ef9f4a2d1ba13d /perl-install/commands.pm
parent0f4c7b1bab30307ecee99c03506b0bb632e5c51f (diff)
downloaddrakx-ea1c93402dfa2aba19ab3dbc3551cd21572affb9.tar
drakx-ea1c93402dfa2aba19ab3dbc3551cd21572affb9.tar.gz
drakx-ea1c93402dfa2aba19ab3dbc3551cd21572affb9.tar.bz2
drakx-ea1c93402dfa2aba19ab3dbc3551cd21572affb9.tar.xz
drakx-ea1c93402dfa2aba19ab3dbc3551cd21572affb9.zip
no_comment
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 26d2a7eb3..914a4a7be 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -199,6 +199,11 @@ sub rights {
$types[$_[0] >> 12 & 0xf] . $r;
}
+sub displaySize {
+ my $m = $_[0] >> 12;
+ $m == 4 || $m == 8 || $m == 10;
+}
+
sub ls {
my ($l , $h) = getopts(\@_, qw(lh));
$h and die "usage: ls [-l] <files...>\n";
@@ -211,7 +216,7 @@ sub ls {
formline(
"@<<<<<<<<< @<<<<<<< @<<<<<<< @>>>>>>>> @>>>>>>>>>>>>>>> @*\n",
rights($s[2]), getpwuid $s[4] || $s[4], getgrgid $s[5] || $s[5],
- $s[6] ? join ", ", unmakedev($s[6]) : $s[7],
+ displaySize($s[2]) ? $s[7] : join(", ", unmakedev($s[6])),
scalar localtime $s[9], -l $_ ? "$_ -> " . readlink $_ : $_);
print $^A; $^A = '';
} else { print "$_\n"; }