diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-07-01 07:24:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-07-01 07:24:52 +0000 |
commit | 705af468108916bba0dd4fabbe6a03d79bfbbc4a (patch) | |
tree | f0c38023c3dc3186e9a32468b07bcc33987d7b1e /perl-install | |
parent | f66549ef0b1df5c83dc8c934c8107064a638da37 (diff) | |
download | drakx-705af468108916bba0dd4fabbe6a03d79bfbbc4a.tar drakx-705af468108916bba0dd4fabbe6a03d79bfbbc4a.tar.gz drakx-705af468108916bba0dd4fabbe6a03d79bfbbc4a.tar.bz2 drakx-705af468108916bba0dd4fabbe6a03d79bfbbc4a.tar.xz drakx-705af468108916bba0dd4fabbe6a03d79bfbbc4a.zip |
create vg_free_space()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs/get.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/fs/get.pm b/perl-install/fs/get.pm index 1db2d3002..02e18fed5 100644 --- a/perl-install/fs/get.pm +++ b/perl-install/fs/get.pm @@ -55,11 +55,17 @@ sub hds_fstab { map { partition_table::get_normal_parts($_) } @_; } +sub vg_free_space { + my ($hd) = @_; + my @parts = partition_table::get_normal_parts($hd); + $hd->{totalsectors} - sum map { $_->{size} } @parts; +} + sub hds_fstab_and_holes { map { if (isLVM($_)) { my @parts = partition_table::get_normal_parts($_); - my $free = $_->{totalsectors} - sum map { $_->{size} } @parts; + my $free = vg_free_space($_); my $free_part = { start => 0, size => $free, pt_type => 0, rootDevice => $_->{VG_name} }; @parts, if_($free >= $_->cylinder_size, $free_part); } else { |