summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-06-09 10:03:13 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-06-09 10:03:13 +0000
commit9ce591e41651e0cdb7508fb40ca3b0ef886172ca (patch)
treef63afc3fa011dcce5244b4c888b01a5982d166c3 /perl-install/fs
parenteebc50e4b2e3cd7da8947df477aa2b1be56a9dac (diff)
downloaddrakx-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/fs')
-rw-r--r--perl-install/fs/partitioning_wizard.pm2
-rw-r--r--perl-install/fs/type.pm10
2 files changed, 10 insertions, 2 deletions
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()) }