summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2016-02-14 02:47:07 +0200
committerThomas Backlund <tmb@mageia.org>2016-02-14 02:47:07 +0200
commitbc20ede924dc68640ca39ed338775aaebdd538fd (patch)
treed122de3488ab126870f74a4d43f9f506834e5bc0 /perl-install/detect_devices.pm
parentd96b239ef9f62cd95168561059ee918d1d23da80 (diff)
downloaddrakx-bc20ede924dc68640ca39ed338775aaebdd538fd.tar
drakx-bc20ede924dc68640ca39ed338775aaebdd538fd.tar.gz
drakx-bc20ede924dc68640ca39ed338775aaebdd538fd.tar.bz2
drakx-bc20ede924dc68640ca39ed338775aaebdd538fd.tar.xz
drakx-bc20ede924dc68640ca39ed338775aaebdd538fd.zip
detect nvme devices as block devices (mga#17743)
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 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.