diff options
author | Thomas Backlund <tmb@mageia.org> | 2016-02-14 02:47:07 +0200 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2016-09-25 11:53:02 +0300 |
commit | 2e56d3c5dd9c062b5a91973d569220c01c74e9b4 (patch) | |
tree | b07200ba0d4eaecc0b13a53efd84b612798c4f9f | |
parent | abd256263738a566cbf986e31deefa0a252255bf (diff) | |
download | drakx-2e56d3c5dd9c062b5a91973d569220c01c74e9b4.tar drakx-2e56d3c5dd9c062b5a91973d569220c01c74e9b4.tar.gz drakx-2e56d3c5dd9c062b5a91973d569220c01c74e9b4.tar.bz2 drakx-2e56d3c5dd9c062b5a91973d569220c01c74e9b4.tar.xz drakx-2e56d3c5dd9c062b5a91973d569220c01c74e9b4.zip |
detect nvme devices as block devices (mga#17743)
(cherry picked from commit bc20ede924dc68640ca39ed338775aaebdd538fd)
-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 9827ec575..ef5241e98 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 16.104 - 13 June 2015 diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 5d32402f3..be81814ef 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. |