diff options
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 10 |
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. |