summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Snapshot/Restore.pm
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-03-19 16:48:22 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-03-19 16:48:22 +0000
commit337d3ae626f638093a98a4294bd51c198a1b953d (patch)
tree4cc2a132384140ef61ac0a3afbd532b39fdb4e89 /lib/MDV/Snapshot/Restore.pm
parenta3827234b3eea428e06f4bc784228384766b1df7 (diff)
downloaddraksnapshot-337d3ae626f638093a98a4294bd51c198a1b953d.tar
draksnapshot-337d3ae626f638093a98a4294bd51c198a1b953d.tar.gz
draksnapshot-337d3ae626f638093a98a4294bd51c198a1b953d.tar.bz2
draksnapshot-337d3ae626f638093a98a4294bd51c198a1b953d.tar.xz
draksnapshot-337d3ae626f638093a98a4294bd51c198a1b953d.zip
(get_handle) simplify
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@240106 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
Diffstat (limited to 'lib/MDV/Snapshot/Restore.pm')
-rw-r--r--lib/MDV/Snapshot/Restore.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MDV/Snapshot/Restore.pm b/lib/MDV/Snapshot/Restore.pm
index 0576040..93e1ffd 100644
--- a/lib/MDV/Snapshot/Restore.pm
+++ b/lib/MDV/Snapshot/Restore.pm
@@ -43,8 +43,8 @@ sub get_fstab() {
}
sub get_handle {
- my ($fstab, $part, $o_rw) = @_;
- my ($mntpnt) = map { $_->{mntpoint} } grep { $_->{device} eq $part->{device} } @$fstab;
+ my ($part, $o_rw) = @_;
+ my $mntpnt = $part->{mntpoint};
# do not bother failed to mount with ro b/c already mounted:
$mntpnt ? { dir => $mntpnt } : any::inspect($part, $::prefix, $o_rw);
@@ -64,7 +64,7 @@ sub find_disks_with_rsnapshot {
my @found;
foreach my $part (@true_fs) {
- my $handle = get_handle($fstab, $part);
+ my $handle = get_handle($part);
next if !$handle;
next if ! -e "$handle->{dir}/etc/rsnapshot.conf";
@@ -183,7 +183,7 @@ sub main {
},
]);
- my $handle = get_handle($fstab, $system->{part}, 1);
+ my $handle = get_handle($system->{part}, 1);
local $::prefix = $handle->{dir};
# reinit paths according to temp mount point: