osInfo() fix manufacturer Apple Silicon (macOS)
This commit is contained in:
+4
-3
@@ -498,15 +498,16 @@ function memLayout(callback) {
|
||||
const lines = stdout.toString().split('\n');
|
||||
const size = parseInt(util.getValue(lines, ' Memory:'));
|
||||
const type = util.getValue(lines, ' Type:');
|
||||
const manufacturerId = util.getValue(lines, ' Manufacturer:');
|
||||
if (size && type) {
|
||||
result.push({
|
||||
size: size * 1024 * 1024 * 1024,
|
||||
bank: '0',
|
||||
type,
|
||||
ecc: false,
|
||||
clockSpeed: 0,
|
||||
formFactor: '',
|
||||
manufacturer: 'Apple',
|
||||
clockSpeed: null,
|
||||
formFactor: 'SOC',
|
||||
manufacturer: getManufacturerDarwin(manufacturerId),
|
||||
partNum: '',
|
||||
serialNum: '',
|
||||
voltageConfigured: null,
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
||||
|
||||
let ifaceSanitized = '';
|
||||
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(SSID);
|
||||
const l = util.mathMin(s.length, 2000);
|
||||
const l = util.mathMin(s.length, 32);
|
||||
|
||||
for (let i = 0; i <= l; i++) {
|
||||
if (s[i] !== undefined) {
|
||||
|
||||
+1
-1
@@ -612,7 +612,7 @@ function wifiConnections(callback) {
|
||||
const network = networkList.filter(nw => nw.ssid === ssid);
|
||||
let ssidSanitized = '';
|
||||
const t = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ssid, true);
|
||||
const l = util.mathMin(t.length, 2000);
|
||||
const l = util.mathMin(t.length, 32);
|
||||
for (let i = 0; i <= l; i++) {
|
||||
if (t[i] !== undefined) {
|
||||
ssidSanitized = ssidSanitized + t[i];
|
||||
|
||||
Reference in New Issue
Block a user