diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-06-09 10:03:13 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-06-09 10:03:13 +0000 |
commit | 9ce591e41651e0cdb7508fb40ca3b0ef886172ca (patch) | |
tree | f63afc3fa011dcce5244b4c888b01a5982d166c3 /perl-install | |
parent | eebc50e4b2e3cd7da8947df477aa2b1be56a9dac (diff) | |
download | drakx-9ce591e41651e0cdb7508fb40ca3b0ef886172ca.tar drakx-9ce591e41651e0cdb7508fb40ca3b0ef886172ca.tar.gz drakx-9ce591e41651e0cdb7508fb40ca3b0ef886172ca.tar.bz2 drakx-9ce591e41651e0cdb7508fb40ca3b0ef886172ca.tar.xz drakx-9ce591e41651e0cdb7508fb40ca3b0ef886172ca.zip |
Use Hal list of recovery partitions (#51532)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 6 | ||||
-rw-r--r-- | perl-install/fs/partitioning_wizard.pm | 2 | ||||
-rw-r--r-- | perl-install/fs/type.pm | 10 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 |
5 files changed, 17 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index f178a21de..610130306 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- use Hal list of recovery partitions (#51532) + Version 12.37 - 02 Jun 2009 - fixed crash when trying to get input devices (#51308) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 856b2a484..79bfb545a 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1065,9 +1065,9 @@ sub suggest { } elsif (arch() !~ /ia64/) { #- search for dos (or windows) boot partition. Do not look in extended partitions! my @windows_boot_parts = - grep { $_->{active} } - grep { isFat_or_NTFS($_) && member(fs::type::fs_type_from_magic($_), 'vfat', 'ntfs', 'ntfs-3g') - && fs::type::part2type_name($_) !~ /^Hidden/; + grep { $_->{active} + && isFat_or_NTFS($_) && member(fs::type::fs_type_from_magic($_), 'vfat', 'ntfs', 'ntfs-3g') + && !isRecovery($_); } map { @{$_->{primary}{normal}} } @{$all_hds->{hds}}; each_index { diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index 947bad0d0..3aa93cdd3 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -122,7 +122,7 @@ sub partitionWizardSolutions { if (my @ok_for_resize_fat = grep { isFat_or_NTFS($_) && !fs::get::part2hd($_, $all_hds)->{readonly} - && fs::type::part2type_name($_) !~ /^Hidden/ } @$fstab) { + && !isRecovery($_) } @$fstab) { $solutions{resize_fat} = [ 20 - @ok_for_resize_fat, N("Use the free space on a Microsoft Windows® partition"), sub { diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index e859b6fc2..f16698e23 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -9,7 +9,7 @@ use devices; our @ISA = qw(Exporter); our @EXPORT = qw( - isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isFat_or_NTFS + isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isFat_or_NTFS isRecovery maybeFormatted set_isFormatted ); @@ -323,6 +323,14 @@ sub isDos { arch() !~ /^sparc/ && ${{ 1 => 1, 4 => 1, 6 => 1 }}{$_[0]{pt_type}} sub isFat_or_NTFS { member($_[0]{fs_type}, 'vfat', 'ntfs', 'ntfs-3g') } sub isApple { $_[0]{pt_type} == 0x401 && defined $_[0]{isDriver} } sub isAppleBootstrap { $_[0]{pt_type} == 0x401 && defined $_[0]{isBoot} } +sub isRecovery { + isFat_or_NTFS($_[0]) && ($_[0]{type_name} eq 'Hidden' || + member($_[0]{device_LABEL} , + # Extracted from /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi + # Hopefuly we'll ask to hal/udev someday + 'RECOVERY', 'PQSERVICE', 'HP_RECOVERY', 'Recovery Partition', 'DellUtility', 'DellRestore', 'IBM_SERVICE', 'SERVICEV001', 'SERVICEV002') + ) +} sub isTrueFS { isTrueLocalFS($_[0]) || member($_[0]{fs_type}, qw(nfs)) } sub isTrueLocalFS { member($_[0]{fs_type}, true_local_fs_types()) } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index b090466e4..36b7c25f5 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- use Hal list of recovery partitions (#51532) + Version 12.36 - 29 May 2009 - ide-disk module is now named ide-gd_mod |