summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-01-21 20:33:43 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-02-25 11:31:23 +0000
commit4b3e4de0e72b4034613c9834f7a60c4822828d6b (patch)
tree17283644e15893539ab5d447223ab56cd87a016e /perl-install/fs
parent0d79e34dad3062575746f97c613f0e643a2d8b29 (diff)
downloaddrakx-4b3e4de0e72b4034613c9834f7a60c4822828d6b.tar
drakx-4b3e4de0e72b4034613c9834f7a60c4822828d6b.tar.gz
drakx-4b3e4de0e72b4034613c9834f7a60c4822828d6b.tar.bz2
drakx-4b3e4de0e72b4034613c9834f7a60c4822828d6b.tar.xz
drakx-4b3e4de0e72b4034613c9834f7a60c4822828d6b.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.
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/type.pm2
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 }