From 8d88a6db0971dcf0d07287408e8ce15fd3481954 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 10 Aug 2002 16:43:41 +0000 Subject: - fix computing the minimal size for reiserfs resizing - use run_program::run instead of system for calling resizing tools --- perl-install/diskdrake/interactive.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index fa3593d89..37296997b 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -627,7 +627,7 @@ sub Resize { write_partitions($in, $hd) or return; if (defined (my $free = fs::df($part))) { $nice_resize{reiserfs} = 1; - $min = max($min, $free); + $min = max($min, $part->{size} - $free); } } elsif (isThisFs('xfs', $part) && isLVM($hd) && $::isStandalone && isMounted($part)) { $min = $part->{size}; #- ensure the user can only increase @@ -675,13 +675,13 @@ sub Resize { } elsif ($nice_resize{ext2}) { my $s = int(($part->{size} << 9) / $block_size); log::l("resize2fs $nice_resize{ext2} to size $s in block of $block_size bytes"); - system "resize2fs", "-pf", $nice_resize{ext2}, $s; + run_program::run("resize2fs", "-pf", $nice_resize{ext2}, $s); } elsif ($nice_resize{reiserfs}) { log::l("reiser resize to $part->{size} sectors"); - install_any::check_prog ("resize_reiserfs") if $::isInstall; - system "resize_reiserfs", "-f", "-q", "-s" . $part->{size}/2 . "K", devices::make($part->{device}); + run_program::run("resize_reiserfs", "-f", "-q", "-s" . $part->{size}/2 . "K", devices::make($part->{device})); } elsif ($nice_resize{xfs}) { - system "xfs_growfs", $part->{mntpoint}; + #- happens only with mounted LVM, see above + run_program::run("xfs_growfs", $part->{mntpoint}); } if (%nice_resize) { -- cgit v1.2.1