systeminformation
Advanced tools
Comparing version 5.25.6 to 5.25.7
@@ -404,6 +404,5 @@ 'use strict'; | ||
let lines = stdout.toString().split('\n'); | ||
let model = util.getValue(lines, 'hardware', ':', true).toUpperCase(); | ||
let version = util.getValue(lines, 'revision', ':', true).toLowerCase(); | ||
if (model === 'BCM2835' || model === 'BCM2708' || model === 'BCM2709' || model === 'BCM2835' || model === 'BCM2837') { | ||
if (util.isRaspberry(lines)) { | ||
@@ -410,0 +409,0 @@ const clockSpeed = { |
@@ -192,3 +192,3 @@ 'use strict'; | ||
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md | ||
if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837' || result.model === '') && model.toLowerCase().indexOf('raspberry') >= 0) { | ||
if (util.isRaspberry(lines)) { | ||
const rPIRevision = util.decodePiCpuinfo(lines); | ||
@@ -508,20 +508,11 @@ result.model = rPIRevision.model; | ||
// raspberry | ||
let linesRpi = ''; | ||
try { | ||
linesRpi = fs.readFileSync('/proc/cpuinfo').toString().split('\n'); | ||
} catch (e) { | ||
util.noop(); | ||
if (util.isRaspberry()) { | ||
const rpi = util.decodePiCpuinfo(); | ||
result.manufacturer = rpi.manufacturer; | ||
result.model = 'Raspberry Pi'; | ||
result.serial = rpi.serial; | ||
result.version = rpi.type + ' - ' + rpi.revision; | ||
result.memMax = os.totalmem(); | ||
result.memSlots = 0; | ||
} | ||
if (linesRpi) { | ||
const hardware = util.getValue(linesRpi, 'hardware'); | ||
if (hardware.startsWith('BCM')) { | ||
const rpi = util.decodePiCpuinfo(linesRpi); | ||
result.manufacturer = rpi.manufacturer; | ||
result.model = 'Raspberry Pi'; | ||
result.serial = rpi.serial; | ||
result.version = rpi.type + ' - ' + rpi.revision; | ||
result.memMax = os.totalmem(); | ||
result.memSlots = 0; | ||
} | ||
} | ||
@@ -528,0 +519,0 @@ if (callback) { callback(result); } |
{ | ||
"name": "systeminformation", | ||
"version": "5.25.6", | ||
"version": "5.25.7", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
817018
18383