summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Media.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV/Draklive/Media.pm')
-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;