diff options
Diffstat (limited to 'lib/MDV/Draklive/Media.pm')
-rw-r--r-- | lib/MDV/Draklive/Media.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm index d75eeb4..278d463 100644 --- a/lib/MDV/Draklive/Media.pm +++ b/lib/MDV/Draklive/Media.pm @@ -2,6 +2,7 @@ package MDV::Draklive::Media; use MDK::Common; use MDV::Draklive::Storage; +use common; sub get_initrd_path { my ($media) = @_; @@ -51,4 +52,14 @@ sub find_partition_index { eval { find_index { $_->{mntpoint} eq $mntpoint } @{$media->{partitions}} }; } +sub supplement_partitions { + my ($media, $total_size) = @_; + + $media->{partitions} ||= [ { mntpoint => '/' } ]; + + my $slash = find { $_->{mntpoint} eq '/' } @{$media->{partitions}}; + $slash->{fs_type} ||= $media->get_media_setting('fs'); + $slash->{size} ||= $total_size / $common::SECTORSIZE; +} + 1; |