summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:28:24 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:28:24 +0000
commita2164f535fbeef5e5e197f81bf897423d43349b1 (patch)
tree98e015c786e4aa0980fd43ea1f8ef90144a96933 /perl-install/detect_devices.pm
parent57be1bfedfe82267fac3bea3a5ae6d59e4bcb8c4 (diff)
downloaddrakx-a2164f535fbeef5e5e197f81bf897423d43349b1.tar
drakx-a2164f535fbeef5e5e197f81bf897423d43349b1.tar.gz
drakx-a2164f535fbeef5e5e197f81bf897423d43349b1.tar.bz2
drakx-a2164f535fbeef5e5e197f81bf897423d43349b1.tar.xz
drakx-a2164f535fbeef5e5e197f81bf897423d43349b1.zip
(ensure_dev_exists,getXenBlk,simple_partition_scan,should_prefer_UUID) add support for XenBlk discs
needs testing
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index d56032284..cafc82e03 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -33,7 +33,7 @@ sub get() {
#- 2. The first SCSI device if SCSI exists. Or
#- 3. The first RAID device if RAID exists.
- getIDE(), getSCSI(), getVirtIO(), getDAC960(), getCompaqSmartArray(), getATARAID();
+ getIDE(), getSCSI(), getXenBlk(), getVirtIO(), getDAC960(), getCompaqSmartArray(), getATARAID();
}
sub hds() { grep { may_be_a_hd($_) } get() }
sub tapes() { grep { $_->{media_type} eq 'tape' } get() }
@@ -386,6 +386,14 @@ sub getATARAID() {
values %l;
}
+sub getXenBlk() {
+ -d '/sys/bus/xen/devices' or return;
+ map {
+ s/block://;
+ { device => basename($_), info => "Xen block device", media_type => 'xvd', bus => 'xen' };
+ } glob("/sys/bus/xen/devices/*/block*");
+}
+
sub getVirtIO() {
-d '/sys/bus/virtio/devices' or return;
map {