diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-01-21 20:33:43 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-02-12 11:54:53 +0000 |
commit | 9f0f880c31175e4941dde0c0facee61ca8b11ef4 (patch) | |
tree | a318f2b4375d0eed6198f5cd05e610f620d22ee8 | |
parent | 631a08ffe0557b1df214a9d08c7c01745eb18107 (diff) | |
download | drakx-9f0f880c31175e4941dde0c0facee61ca8b11ef4.tar drakx-9f0f880c31175e4941dde0c0facee61ca8b11ef4.tar.gz drakx-9f0f880c31175e4941dde0c0facee61ca8b11ef4.tar.bz2 drakx-9f0f880c31175e4941dde0c0facee61ca8b11ef4.tar.xz drakx-9f0f880c31175e4941dde0c0facee61ca8b11ef4.zip |
Don't treat Empty or BIOS_GRUB partitions as free space (mga#20074).
The subroutine isEmpty() is used to identify free space on the disk
(not DOS "Empty" partitions). Because we use a string to flag Empty
and BIOS_GRUB partitions, rather than a numeric value, the numeric
equality operator gives false positives.
-rw-r--r-- | perl-install/fs/type.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index a6a53c83e..abfdb04e5 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -292,7 +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 isEmpty { !$_[0]{fs_type} && !$_[0]{pt_type} } sub isBIOS_GRUB { $_[0]{pt_type} eq 'BIOS_GRUB' } sub isESP { $_[0]{pt_type} == 0xef && member($_[0]{fs_type}, qw(fat32 vfat)) } sub isExtended { $_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85 } |