From 444eed89d799da4686b90b70e81deafe10b40ae5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 27 Feb 2008 14:22:15 +0000 Subject: create read_mtab() --- urpm/sys.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/urpm/sys.pm b/urpm/sys.pm index d4484458..f40cc401 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -54,6 +54,8 @@ sub find_mntpoints { } } +sub read_mtab() { _read_fstab_or_mtab('/etc/mtab') } + #- find used mount point from a pathname sub _find_a_mntpoint { my ($dir, $infos) = @_; @@ -62,7 +64,7 @@ sub _find_a_mntpoint { foreach (_read_fstab_or_mtab("/etc/fstab")) { $infos->{$_->{mntpoint}} = { mounted => 0, %$_ }; } - foreach (_read_fstab_or_mtab("/etc/mtab")) { + foreach (read_mtab()) { $infos->{$_->{mntpoint}} = { mounted => 1, %$_ }; } -- cgit v1.2.1