summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-06-08 22:48:20 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-06-11 09:39:32 +0200
commit83565d0739e5746ea02c210106a2d1f1d1477eda (patch)
tree26f2c7d16ac0db03877aba5f03c09909d22048e6 /perl-install/fs
parente07551ebb52e93af424de2d3a2bf07b01c94de92 (diff)
downloaddrakx-83565d0739e5746ea02c210106a2d1f1d1477eda.tar
drakx-83565d0739e5746ea02c210106a2d1f1d1477eda.tar.gz
drakx-83565d0739e5746ea02c210106a2d1f1d1477eda.tar.bz2
drakx-83565d0739e5746ea02c210106a2d1f1d1477eda.tar.xz
drakx-83565d0739e5746ea02c210106a2d1f1d1477eda.zip
detect GRUB_BIOS partitions (mga#18656)
let's abuse ->{pt_type} for tracking such partitions
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/type.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index ef296fa53..eeb81fec7 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 isRawLUKS isRAID isLVM isLUKS isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isESP isFat_or_NTFS isnormal_Fat_or_NTFS isRecovery
+ isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRawLUKS isRAID isLVM isLUKS isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isBIOS_GRUB isESP isFat_or_NTFS isnormal_Fat_or_NTFS isRecovery
maybeFormatted set_isFormatted defaultFS
);
@@ -24,8 +24,9 @@ my (%type_name2pt_type, %type_name2fs_type, %fs_type2pt_type, %pt_type2fs_type,
0x83 => 'ext3', 'Journalised FS: ext3',
0x83 => 'ext4', 'Journalised FS: ext4',
0x83 => 'btrfs', 'Journalised FS: Btrfs',
-if_(is_uefi(),
- 0xef => 'vfat', 'EFI System Partition',
+(is_uefi() ?
+ (0xef => 'vfat', 'EFI System Partition') :
+ ('BIOS_GRUB' => '', 'BIOS boot partition'),
),
if_(arch() =~ /i.86|x86_64/,
0x83 => 'xfs', 'Journalised FS: XFS',
@@ -291,6 +292,7 @@ sub defaultFS() { 'ext4' }
sub true_local_fs_types() { qw(btrfs ext3 ext2 ext4 reiserfs xfs jfs) }
sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 }
+sub isBIOS_GRUB { $_[0]{pt_type} == 'BIOS_GRUB' }
sub isESP { $_[0]{pt_type} == 0xef && $_[0]{fs_type} eq 'vfat' }
sub isExtended { $_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85 }
sub isRawLVM { $_[0]{pt_type} == 0x8e || $_[0]{type_name} eq 'Linux Logical Volume Manager' }