diff --git a/lib/diskutil.js b/lib/diskutil.js index f402c0b8..1ac2f7fd 100644 --- a/lib/diskutil.js +++ b/lib/diskutil.js @@ -56,7 +56,7 @@ const transform = (disk) => { busType: disk.BusProtocol || 'UNKNOWN', busVersion: null, device: disk.DeviceNode, - devicePath: null, + devicePath: disk.DeviceTreePath || null, raw: disk.DeviceNode && disk.DeviceNode.replace('/disk', '/rdisk'), description: disk.IORegistryEntryName || disk.MediaName, error: null, diff --git a/tests/diskutil.spec.js b/tests/diskutil.spec.js index 0715e9c3..31c8e59f 100644 --- a/tests/diskutil.spec.js +++ b/tests/diskutil.spec.js @@ -44,7 +44,7 @@ describe('Drivelist', function() { busType: 'PCI-Express', busVersion: null, device: '/dev/disk1', - devicePath: null, + devicePath: 'IODeviceTree:/PCI0@0/RP17@1B/SSD0@0/IONVMeController', raw: '/dev/rdisk1', description: 'Macintosh HD', error: null,