From 0729347e519554ad7a9d1bb24697a31e57e15b0c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 26 Feb 2008 21:34:47 +0000 Subject: every callers give a hash ref, so remove unneeded code --- urpm/sys.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/urpm/sys.pm b/urpm/sys.pm index a6c6bc91..2e71943f 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -38,18 +38,14 @@ sub find_mntpoints { or next; $mntpoint =~ s,/+,/,g; $mntpoint =~ s,/$,,; $fstab{$mntpoint} = 0; - if (ref($infos)) { - $infos->{$mntpoint} = { mounted => 0, device => $device, fs => $fstype }; - } + $infos->{$mntpoint} = { mounted => 0, device => $device, fs => $fstype }; } foreach (cat_("/etc/mtab")) { my ($device, $mntpoint, $fstype, $options) = m!^\s*(\S+)\s+(/\S+)\s+(\S+)\s+(\S+)! or next; $mntpoint =~ s,/+,/,g; $mntpoint =~ s,/$,,; $fstab{$mntpoint} = 1; - if (ref($infos)) { - $infos->{$mntpoint} = { mounted => 1, device => $device, fs => $fstype }; - } + $infos->{$mntpoint} = { mounted => 1, device => $device, fs => $fstype }; } #- try to follow symlink, too complex symlink graph may not be seen. @@ -62,9 +58,7 @@ sub find_mntpoints { $pdir .= "/$_"; $pdir =~ s,/+,/,g; $pdir =~ s,/$,,; if (exists($fstab{$pdir})) { - ref($infos) and push @mntpoints, $pdir; - $infos eq 'mount' && ! $fstab{$pdir} and push @mntpoints, $pdir; - $infos eq 'umount' && $fstab{$pdir} and unshift @mntpoints, $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 -- cgit v1.2.1