summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/detect_devices.pm10
2 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 97500df1c..c83cedad8 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,4 @@
+- detect nvme devices as block devices (mga#17743)
- detect partitions on nvme devices (mga#17743)
Version 17.18.1 - 10 February 2016
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 526ff17fc..2b4c2b04f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -74,7 +74,7 @@ sub get() {
#- 2. The first SCSI device if SCSI exists. Or
#- 3. The first RAID device if RAID exists.
- getIDE(), getSCSI(), getMmcBlk(), getXenBlk(), getVirtIO(), getDAC960(), getCompaqSmartArray();
+ getIDE(), getSCSI(), getMmcBlk(), getNVMe() getXenBlk(), getVirtIO(), getDAC960(), getCompaqSmartArray();
}
sub hds() { grep { may_be_a_hd($_) } get() }
sub tapes() { grep { $_->{media_type} eq 'tape' } get() }
@@ -473,6 +473,14 @@ sub getMmcBlk() {
glob("/sys/bus/mmc/devices/*/block/*");
}
+sub getNVMe() {
+ -d '/sys/bus/pci_express/devices' or return;
+ map {
+ { device => basename($_), info => "NVMe block device", media_type => 'hd', bus => 'pci_express' };
+ }
+ glob("/sys/bus/pci_express/devices/*/block/*");
+}
+
=item getCPUs()
Returns a list of all CPUs.