summaryrefslogtreecommitdiffstats
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
parentd6ee5ed5ee641c7af924deea9aea421650fce0ee (diff)
downloaddrakx-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar
drakx-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.gz
drakx-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.bz2
drakx-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.tar.xz
drakx-d8ebe36acd6b20cb92bf9a6c534091c68d53a252.zip
ntfsresize feature added (not tested!)
-rw-r--r--perl-install/diskdrake/interactive.pm11
-rw-r--r--perl-install/share/list2
2 files changed, 13 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}));
diff --git a/perl-install/share/list b/perl-install/share/list
index e61a11d1e..20b0dac1c 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -25,6 +25,8 @@
/usr/bin/packdrake
/usr/bin/parsehdlist
/usr/bin/perl
+/usr/sbin/ntfsresize
+
/usr/LIB/gconv/BIG5.so
/usr/LIB/gconv/EUC-JP.so
/usr/LIB/gconv/libGB.so