diff options
author | Thomas Backlund <tmb@mageia.org> | 2016-02-14 02:47:07 +0200 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2016-02-14 02:47:07 +0200 |
commit | bc20ede924dc68640ca39ed338775aaebdd538fd (patch) | |
tree | d122de3488ab126870f74a4d43f9f506834e5bc0 /perl-install | |
parent | d96b239ef9f62cd95168561059ee918d1d23da80 (diff) | |
download | drakx-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')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 10 |
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. |