summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-29 12:35:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-29 12:35:03 +0000
commit3109582da9906a089f97f4d86f97e5a6ad737f6b (patch)
treebd6b6d9931808cc65ce023dcc3f9c09d088039de /perl-install/fsedit.pm
parentd7f73f3d388c37c283a0abf93283f2bc0b3c7466 (diff)
downloaddrakx-backup-do-not-use-3109582da9906a089f97f4d86f97e5a6ad737f6b.tar
drakx-backup-do-not-use-3109582da9906a089f97f4d86f97e5a6ad737f6b.tar.gz
drakx-backup-do-not-use-3109582da9906a089f97f4d86f97e5a6ad737f6b.tar.bz2
drakx-backup-do-not-use-3109582da9906a089f97f4d86f97e5a6ad737f6b.tar.xz
drakx-backup-do-not-use-3109582da9906a089f97f4d86f97e5a6ad737f6b.zip
try to better handle symlinks device and devfs devices
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm11
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') {