diff options
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r-- | perl-install/fsedit.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 2c98bbd92..42a6b7311 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -213,7 +213,7 @@ sub readProcPartitions { $part->{size} *= 2; # from KB to sectors $part->{type} = typeOfPart($dev); - delete @$part{'major', 'minor', 'dev'}; # cleanup + delete $part->{dev}; # cleanup } @parts; } @@ -228,6 +228,15 @@ sub part2hd { $hd; } +sub is_same_hd { + my ($hd1, $hd2) = @_; + if ($hd1->{major} && $hd2->{major}) { + $hd1->{major} == $hd2->{major} && $hd1->{minor} == $hd2->{minor}; + } else { + $hd1->{device} eq $hd2->{device}; + } +} + sub is_same_part { my ($part1, $part2) = @_; foreach ('start', 'size', 'type', 'rootDevice') { |