From 950118e80153c25bb513903b4d2860b111f5ea4a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 26 Jan 2005 17:31:27 +0000 Subject: nicer description() (esp. when the size is 0) --- perl-install/partition_table.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index d9f9c1bea..15a918300 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -28,10 +28,10 @@ sub description { sprintf "%s%s (%s%s%s%s)", $hd->{device}, $win && " [$win:]", - formatXiB($hd->{totalsectors} || $hd->{size}, 512), - $hd->{info} && ", $hd->{info}", - $hd->{mntpoint} && ", " . $hd->{mntpoint}, - $hd->{fs_type} && ", $hd->{fs_type}"; + join(', ', + grep { $_ } + formatXiB($hd->{totalsectors} || $hd->{size}, 512), + $hd->{info}, $hd->{mntpoint}, $hd->{fs_type}); } sub isPrimary { -- cgit v1.2.1