diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-31 00:50:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-31 00:50:56 +0000 |
commit | 2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f (patch) | |
tree | c61529cf3710c37e6f2d3b68b740b40fd7f5109f /perl-install/diskdrake/interactive.pm | |
parent | db0dc40ad297041e36bb39ec5993db30b94cbf27 (diff) | |
download | drakx-backup-do-not-use-2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f.tar drakx-backup-do-not-use-2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f.tar.gz drakx-backup-do-not-use-2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f.tar.bz2 drakx-backup-do-not-use-2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f.tar.xz drakx-backup-do-not-use-2dcc6852ee2dd49f88999bb6141df1d56f8bbb3f.zip |
create diskdrake::resize_ntfs to factorize code
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index dd5f73a8d..a50eabed7 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -655,12 +655,9 @@ sub Resize { } } elsif (isThisFs('ntfs', $part)) { write_partitions($in, $hd) or return; - my $dev = devices::make($part->{device}); - my $r = run_program::get_stdout('ntfsresize', '-f', '-i', $dev); - if ($r =~ /minimal size: (\d+) KiB/) { - $min = $1 * 2; - $nice_resize{ntfs} = $dev; - } + require diskdrake::resize_ntfs; + $nice_resize{ntfs} = resize_fat::main->new($part->{device}, devices::make($part->{device})); + $min = $nice_resize{ntfs}->min_size or delete $nice_resize{ntfs}; } elsif (isThisFs("reiserfs", $part)) { write_partitions($in, $hd) or return; if (defined(my $free = fs::df($part))) { @@ -726,7 +723,7 @@ sub Resize { run_program::run("resize2fs", "-pf", $nice_resize{ext2}, $s); } elsif ($nice_resize{ntfs}) { log::l("ntfs resize to $part->{size} sectors"); - run_program::run_or_die('ntfsresize', '-ff', '-s' . int($part->{size}/2) . 'ki', devices::make($part->{device})); + $nice_resize{ntfs}->resize($part->{size}); } elsif ($nice_resize{reiserfs}) { log::l("reiser resize to $part->{size} sectors"); run_program::run('resize_reiserfs', '-f', '-q', '-s' . int($part->{size}/2) . 'K', devices::make($part->{device})); |