fix(adapters): Always ignore RAID attached devices

Change-Type: patch
Changelog-Entry: Exclude RAID devices from drive selection list
This commit is contained in:
Jonas Hermsmeier 2018-04-17 16:14:05 +02:00
parent a044d2fe86
commit 355373f24d
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -79,6 +79,11 @@ class BlockDeviceAdapter extends EventEmitter {
this.emit('error', error)
callback && callback(error)
}).filter((drive) => {
// Always ignore RAID attached devices, as they are in danger-country;
// Even flashing RAIDs intentionally can have unintended effects
if (drive.busType === 'RAID') {
return false
}
return !drive.error && (options.includeSystemDrives || !drive.isSystem)
}).map((drive) => {
drive.displayName = drive.device