diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-07-25 21:30:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-07-25 21:30:14 +0000 |
commit | 5dc2835bfbf1f53ad51ba540f4423c22cc94b26c (patch) | |
tree | b58e6ee5478457e9b2851cf79f8067f1af1c376a /perl-install/partition_table.pm | |
parent | e556c04ec489070c46bbbc1ebc47ec2613fb5f6e (diff) | |
download | drakx-backup-do-not-use-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar drakx-backup-do-not-use-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.gz drakx-backup-do-not-use-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.bz2 drakx-backup-do-not-use-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.tar.xz drakx-backup-do-not-use-5dc2835bfbf1f53ad51ba540f4423c22cc94b26c.zip |
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 16 |
1 files changed, 15 insertions, 1 deletions
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($) { |