osInfo() fix manufacturer Apple Silicon (macOS)

This commit is contained in:
Sebastian Hildebrandt
2024-12-25 08:35:25 +01:00
parent a6317311c5
commit c114c51ea5
6 changed files with 13 additions and 6 deletions
+4 -3
View File
@@ -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
View File
@@ -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
View File
@@ -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];