summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 22:00:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 22:00:03 +0000
commitfc184895703ffc0f3ad09df93227caae553a6cf5 (patch)
tree4aed20afb05ba631608076a3a54e361f510de4a1 /urpm
parent3adde6b3bb3104dd6e0329778826c0fc5eddd268 (diff)
downloadurpmi-fc184895703ffc0f3ad09df93227caae553a6cf5.tar
urpmi-fc184895703ffc0f3ad09df93227caae553a6cf5.tar.gz
urpmi-fc184895703ffc0f3ad09df93227caae553a6cf5.tar.bz2
urpmi-fc184895703ffc0f3ad09df93227caae553a6cf5.tar.xz
urpmi-fc184895703ffc0f3ad09df93227caae553a6cf5.zip
simplify
Diffstat (limited to 'urpm')
-rw-r--r--urpm/sys.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index b6ef73be..4dc160c1 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -39,8 +39,7 @@ sub _read_fstab_or_mtab {
@l;
}
-#- find used mount point from a pathname, use a optional mode to allow
-#- filtering according the next operation (mount or umount).
+#- find used mount point from a pathname
sub find_mntpoints {
my ($dir, $infos) = @_;
@@ -52,7 +51,6 @@ sub find_mntpoints {
$infos->{$_->{mntpoint}} = { mounted => 1, %$_ };
}
- my (@mntpoints);
#- try to follow symlink, too complex symlink graph may not be seen.
#- check the possible mount point.
my @paths = split '/', $dir;
@@ -63,19 +61,18 @@ sub find_mntpoints {
$pdir .= "/$path";
$pdir =~ s,/+,/,g; $pdir =~ s,/$,,;
if (exists($infos->{$pdir})) {
- push @mntpoints, $pdir;
#- following symlinks may be useless or dangerous for supermounted devices.
#- this means it is assumed no symlink inside a removable device
#- will go outside the device itself (or at least will go into
#- regular already mounted device like /).
#- for simplification we refuse also any other device and stop here.
- last;
+ return $pdir;
} elsif (-l $pdir) {
unshift @paths, split '/', _expand_symlink($pdir);
$pdir = '';
}
}
- @mntpoints;
+ ();
}
sub _expand_symlink {