diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-26 21:34:47 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-26 21:34:47 +0000 |
commit | 0729347e519554ad7a9d1bb24697a31e57e15b0c (patch) | |
tree | 1efb595a83318285736666fc06746b76021b0b0f | |
parent | 1e4ea575b35d9168463f09263e3933b50248ad6e (diff) | |
download | urpmi-0729347e519554ad7a9d1bb24697a31e57e15b0c.tar urpmi-0729347e519554ad7a9d1bb24697a31e57e15b0c.tar.gz urpmi-0729347e519554ad7a9d1bb24697a31e57e15b0c.tar.bz2 urpmi-0729347e519554ad7a9d1bb24697a31e57e15b0c.tar.xz urpmi-0729347e519554ad7a9d1bb24697a31e57e15b0c.zip |
every callers give a hash ref, so remove unneeded code
-rw-r--r-- | urpm/sys.pm | 12 |
1 files 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 |