summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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($) {