summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV/Draklive')
-rw-r--r--lib/MDV/Draklive/Media.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm
index 0e3e738..76188d8 100644
--- a/lib/MDV/Draklive/Media.pm
+++ b/lib/MDV/Draklive/Media.pm
@@ -36,4 +36,13 @@ sub get_media_label {
first($media->get_media_setting('source') =~ /^LABEL=(.*)$/);
}
+sub get_media_source_for_nash {
+ my ($media) = @_;
+ my $label = $media->get_media_label;
+ #- strip vfat labels to 11 chars and upper-case it
+ $label && $media->get_media_setting('fs') eq 'vfat' ?
+ 'LABEL=' . uc(substr($label, 0, 11)) :
+ $media->get_media_setting('source');
+}
+
1;