summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-28 20:54:33 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-28 20:54:33 +0000
commitef64a367150c060b49b163db3a4383e68d3d3265 (patch)
tree544f6c3e1c659055ca316213c3df170d9d1af354 /lib/MDV/Draklive
parentb0922dab94b1d940bcac87cabed5bca33608e082 (diff)
downloaddrakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar
drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.gz
drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.bz2
drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.xz
drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.zip
move get_media_source_for_nash as method in MDV::Draklive::Media
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;