summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Storage.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV/Draklive/Storage.pm')
-rw-r--r--lib/MDV/Draklive/Storage.pm39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/MDV/Draklive/Storage.pm b/lib/MDV/Draklive/Storage.pm
new file mode 100644
index 0000000..4949d11
--- /dev/null
+++ b/lib/MDV/Draklive/Storage.pm
@@ -0,0 +1,39 @@
+package MDV::Draklive::Storage;
+
+our %storage_types = (
+ cdrom => {
+ modules => 'bus/firewire|usb disk/firewire|hardware_raid|ide|sata|scsi|usb',
+ media_modules => 'disk/cdrom',
+ fs => 'iso9660',
+ can_hide => 0,
+ source => 'LABEL=MDVCDROOT',
+ read_only => 1,
+ detect => \&detect_devices::burners,
+ create => \&create_cdrom_master,
+ format => \&format_cdrom_device,
+ record_needs_master => 1,
+ record => \&record_cdrom_master,
+ },
+ usb => {
+ modules => 'bus/usb disk/usb',
+ media_modules => 'disk/raw',
+ fs => 'vfat',
+ can_hide => 1,
+ bootloader => 'grub',
+ source => 'LABEL=MDVUSBROOT',
+ detect => sub { grep { detect_devices::isKeyUsb($_) } detect_devices::get() },
+ create => \&create_disk_master,
+ format => \&format_usb_device,
+ record => \&record_usb_master,
+ image => \&create_disk_image,
+ replicator => \&create_usb_replicator,
+ },
+ harddisk => {
+ fs => 'ext3',
+ create => \&create_disk_master,
+ record => \&record_harddisk_master,
+ image => \&create_disk_image,
+ },
+);
+
+1;