summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-07-25 21:30:14 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-07-25 21:30:14 +0000
commit5dc2835bfbf1f53ad51ba540f4423c22cc94b26c (patch)
treeb58e6ee5478457e9b2851cf79f8067f1af1c376a
parente556c04ec489070c46bbbc1ebc47ec2613fb5f6e (diff)
downloaddrakx-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar
drakx-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.gz
drakx-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.bz2
drakx-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.xz
drakx-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.zip
no_comment
-rw-r--r--perl-install/fsedit.pm3
-rw-r--r--perl-install/my_gtk.pm1
-rw-r--r--perl-install/partition_table.pm16
3 files changed, 18 insertions, 2 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 7406211e7..5269ea25e 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -39,8 +39,9 @@ sub hds($$) {
my $file = devices::make($_->{device});
my $hd = partition_table_raw::get_geometry($file) or die _("An error occurred while getting the geometry of block device %s: %s", $file, "$!");
+ $hd = { (%$_, %$hd) };
$hd->{file} = $file;
- $hd->{prefix} = $hd->{device} = $_->{device};
+ $hd->{prefix} = $hd->{device};
# for RAID arrays of format c0d0p1
$hd->{prefix} .= "p" if $hd->{prefix} =~ m,(rd|ida)/,;
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index b432e706b..78a308856 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -164,6 +164,7 @@ sub create_notebook(@) {
my $book = shift;
my ($w1, $w2) = map { new Gtk::Label($_) } $title, $title;
+ $book->{widget_title} = $w1;
$n->append_page_menu($book, $w1, $w2);
$book->show;
$w1->show;
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 0ad949a53..1986e4dd9 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -78,7 +78,7 @@ my %fs2type = reverse %type2fs;
1;
-sub type2name($) { $types{$_[0]} }
+sub type2name($) { $types{$_[0]} || 'unknown' }
sub type2fs($) { $type2fs{$_[0]} }
sub name2type($) { $types_rev{$_[0]} }
sub fs2type($) { $fs2type{$_[0]} }
@@ -137,6 +137,20 @@ sub assign_device_numbers($) {
my $i = 1; foreach (@{$hd->{primary}->{raw}}, map { $_->{normal} } @{$hd->{extended}}) {
$_->{device} = $hd->{prefix} . $i++;
}
+
+ # try to figure what the windobe drive letter could be!
+ #
+ # first verify there's at least one primary dos partition, otherwise it
+ # means it is a secondary disk and all will be false :(
+ my ($c, @others) = grep { isDos($_) || isWin($_) } @{$hd->{primary}->{raw}};
+ $c or return;
+
+ $i = ord 'D';
+ foreach (grep { isDos($_) || isWin($_) } @{$hd->{extended}}) {
+ $_->{device_windobe} = chr($i++);
+ }
+ $c->{device_windobe} = 'C';
+ $_->{device_windobe} = chr($i++) foreach @others;
}
sub get_normal_parts($) {