summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-29 11:36:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-29 11:36:13 +0000
commitd8ebe36acd6b20cb92bf9a6c534091c68d53a252 (patch)
tree53c4d34e6202e101f30c467809275d7c0b023c02 /perl-install/diskdrake
parentd6ee5ed5ee641c7af924deea9aea421650fce0ee (diff)
downloaddrakx-backup-do-not-use-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar
drakx-backup-do-not-use-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.gz
drakx-backup-do-not-use-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.bz2
drakx-backup-do-not-use-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.xz
drakx-backup-do-not-use-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.zip
ntfsresize feature added (not tested!)
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 95a7920bc..4406775db 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -654,6 +654,14 @@ sub Resize {
} else {
delete $nice_resize{ext2};
}
+ } elsif (isThisFs('ntfs', $part)) {
+ write_partitions($in, $hd) or return;
+ my $dev = devices::make($part->{device});
+ my $r = run_program::get_stdout('ntfsresize', '-i', $dev);
+ if ($r =~ /minimal size: (\d+) KiB/) {
+ $min = $r * 2;
+ $nice_resize{ntfs} = $dev;
+ }
} elsif (isThisFs("reiserfs", $part)) {
write_partitions($in, $hd) or return;
if (defined(my $free = fs::df($part))) {
@@ -707,6 +715,9 @@ sub Resize {
my $s = int($part->{size} / ($block_size / 512));
log::l("resize2fs $nice_resize{ext2} to size $s in block of $block_size bytes");
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', '-f', '-s' . $part->{size}/2 . "Ki", devices::make($part->{device}));
} elsif ($nice_resize{reiserfs}) {
log::l("reiser resize to $part->{size} sectors");
run_program::run("resize_reiserfs", "-f", "-q", "-s" . $part->{size}/2 . "K", devices::make($part->{device}));