diff options
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/lvm.pm | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index df957ae56..dcccc1c97 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -1210,7 +1210,7 @@ sub format_part_info { $info .= N("RAID %s\n", $part->{raid}) if isPartOfRAID($part); if (isPartOfLVM($part)) { $info .= sprintf "LVM %s\n", $part->{lvm}; - $info .= sprintf "Used physical extents %d / %d\n", split(' ', lvm::get_pv_field($part, 'pv_pe_alloc_count,pv_pe_count')); + $info .= sprintf "Used physical extents %d / %d\n", lvm::pv_physical_extents($part); } $info .= N("Loopback file(s):\n %s\n", join(", ", map { $_->{loopback_file} } @{$part->{loopback}})) if isPartOfLoopback($part); $info .= N("Partition booted by default\n (for MS-DOS boot, not for lilo)\n") if $part->{active} && $::expert; diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 9a68877af..d3a83a186 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -68,7 +68,10 @@ sub get_pv_field { my $dev = expand_symlinks(devices::make($pv->{device})); run_program::get_stdout('lvm2', 'pvs', '--noheadings', '--nosuffix', '-o', $field, $dev); } - +sub pv_physical_extents { + my ($pv) = @_; + split(' ', lvm::get_pv_field($pv, 'pv_pe_alloc_count,pv_pe_count')) +} sub pv_to_vg { my ($pv) = @_; get_pv_field($pv, 'vg_name') =~ /(\S+)/ && $1; |