bugfix diskLayout().size
This commit is contained in:
+1
-1
@@ -584,8 +584,8 @@ function diskLayout(callback) {
|
||||
}
|
||||
|
||||
const sizeString = util.getValue(lines, 'size', ':', true).trim();
|
||||
const sizeValue = sizeString.match(/\(([^)]+)\)/)[1];
|
||||
if (sizeString && lines.length > 0 && lines[0].trim() === 'disk') {
|
||||
const sizeValue = sizeString.match(/\(([^)]+)\)/)[1];
|
||||
result.push({
|
||||
type: (mediumType === '0' ? 'SSD' : (mediumType === '1' ? 'HD' : (device.indexOf('SSD') > -1 ? 'SSD' : 'HD'))), // to be tested ... /sys/block/sda/queue/rotational
|
||||
name: util.getValue(lines, 'product:', ':', true),
|
||||
|
||||
Reference in New Issue
Block a user