summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-06-26 20:20:42 +0000
committerOlivier Blin <oblin@mandriva.com>2009-06-26 20:20:42 +0000
commit9ddd445f2d3067a214cfbeb1f09a684deb95db9c (patch)
tree5e8379f60488419d72184a68acdb61442d41c709 /lib
parent4e6c73bc390f1d4e2a51c95bb3016d69558c0619 (diff)
downloaddraklive-9ddd445f2d3067a214cfbeb1f09a684deb95db9c.tar
draklive-9ddd445f2d3067a214cfbeb1f09a684deb95db9c.tar.gz
draklive-9ddd445f2d3067a214cfbeb1f09a684deb95db9c.tar.bz2
draklive-9ddd445f2d3067a214cfbeb1f09a684deb95db9c.tar.xz
draklive-9ddd445f2d3067a214cfbeb1f09a684deb95db9c.zip
add find_partition_index helper
Diffstat (limited to 'lib')
-rw-r--r--lib/MDV/Draklive/Media.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm
index 6c916ca..bdf4834 100644
--- a/lib/MDV/Draklive/Media.pm
+++ b/lib/MDV/Draklive/Media.pm
@@ -46,4 +46,9 @@ sub get_media_source_for_nash {
$media->get_media_setting('source');
}
+sub find_partition_index {
+ my ($media, $mntpoint) = @_;
+ find_index { $_->{mntpoint} eq $mntpoint } @{$media->{partitions}};
+}
+
1;