summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/interactive.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-02-03 13:11:08 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-02-03 13:11:08 +0000
commitad54149b1633417ff31936fa43c2c3e9cf11d28f (patch)
tree2c6a593266c4f10f8331f723ea021a9457a48183 /perl-install/diskdrake/interactive.pm
parent5fa353cab56b79b702808a695ef92b77a47fd375 (diff)
downloaddrakx-ad54149b1633417ff31936fa43c2c3e9cf11d28f.tar
drakx-ad54149b1633417ff31936fa43c2c3e9cf11d28f.tar.gz
drakx-ad54149b1633417ff31936fa43c2c3e9cf11d28f.tar.bz2
drakx-ad54149b1633417ff31936fa43c2c3e9cf11d28f.tar.xz
drakx-ad54149b1633417ff31936fa43c2c3e9cf11d28f.zip
Use existing code for mounting a partition
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r--perl-install/diskdrake/interactive.pm26
1 files changed, 2 insertions, 24 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 8c5445f83..838463204 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -441,30 +441,8 @@ sub part_possible_actions {
sub View {
my ($in, $hd, $part, $all_hds) = @_;
- my $old_mountpoint = $part->{mntpoint};
- my $old_real_mountpoint = $part->{real_mntpoint};
- my $was_mounted = $part->{isMounted};
- my $mountpoint;
- if(!$was_mounted) {
- $part->{mntpoint} = '/tmp/mnt_browse';
- $mountpoint = $part->{mntpoint};
- mkdir_p($part->{mntpoint});
- my $w;
- fs::mount::part($part, 0, sub {
- my ($msg) = @_;
- $w ||= $in->wait_message(N("Please wait"), $msg);
- $w->set($msg);
- });
- } else {
- $mountpoint = $part->{real_mntpoint} || $part->{mntpoint};
- }
- $in->ask_directory({'directory'=>$part->{mntpoint}});
- if(!$was_mounted) {
- fs::mount::umount($part);
- $part->{mntpoint} = $old_mountpoint;
- $part->{real_mntpoint} = $old_real_mountpoint;
- unlink($mountpoint);
- }
+ my $handle = any::inspect($part, $::prefix);
+ $in->ask_directory({'directory'=>$handle->{dir}});
}
#- in case someone use diskdrake only to create partitions,