diff --git a/CHANGELOG.md b/CHANGELOG.md
index 695e2d5..0257d5e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,7 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
-| 5.1.0 | 2020-02-08 | `memLayout()` added ECC flag |
+| 5.1.0 | 2020-02-08 | `memLayout()` added ECC flag, `bios()` added language, features (linux) |
| 5.0.11 | 2020-02-07 | `fsSize()` fixed windows WSL issue |
| 5.0.10 | 2020-02-06 | `getDynamicData()` fixed windows WSL issue |
| 5.0.9 | 2020-02-02 | `fsSize()` fixed parsing edge case issue mac OS |
diff --git a/README.md b/README.md
index 602b5ef..98cd8c9 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ si.cpu()
(last 7 major and minor version releases)
-- Version 5.1.0: `memLayout()` added ECC flag
+- Version 5.1.0: `memLayout()` added ECC flag, `bios()` added language, features (linux)
- Version 5.0.0: new version 5 - attention there are some breaking changes. See [detailed version 5 changes here][changes5-url].
- Version 4.34.0: `system()` added flag virtual (linux, windows)
- Version 4.33.0: `graphics()` added nvidia-smi support (linux, windows)
diff --git a/docs/history.html b/docs/history.html
index d3582d9..465e47e 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -59,7 +59,7 @@
| 5.1.0 |
2020-02-08 |
- memLayout() added ECC flag |
+ memLayout() added ECC flag, bios() added language, features (linux) |
| 5.0.11 |
diff --git a/docs/memory.html b/docs/memory.html
index e70a5c0..f148eee 100644
--- a/docs/memory.html
+++ b/docs/memory.html
@@ -361,6 +361,7 @@ si.memLayout().then(data => console.log(data));
size: 34359738368,
bank: 'BANK 0',
type: 'DDR4',
+ ecc: false,
clockSpeed: 2667,
formFactor: 'SODIMM',
manufacturer: '029E',
@@ -374,6 +375,7 @@ si.memLayout().then(data => console.log(data));
size: 34359738368,
bank: 'BANK 2',
type: 'DDR4',
+ ecc: false,
clockSpeed: 2667,
formFactor: 'SODIMM',
manufacturer: '029E',
diff --git a/docs/system.html b/docs/system.html
index 63d0b6a..7b847b6 100644
--- a/docs/system.html
+++ b/docs/system.html
@@ -292,6 +292,26 @@ si.uuid().then(data => console.log(data));
|
revision |
+
+ |
+ language |
+ X |
+ |
+ |
+ |
+ |
+ bios language |
+
+
+ |
+ features |
+ X |
+ |
+ |
+ |
+ |
+ supported features |
+
|
@@ -303,7 +323,20 @@ si.bios().then(data => console.log(data));
vendor: 'American Megatrends Inc.',
version: 'P4.20',
releaseDate: '2019-09-05',
- revision: '5.13'
+ revision: '5.13',
+ langage: 'en',
+ features: [
+ 'PCI',
+ 'Boot from CD',
+ 'Selectable boot',
+ 'EDD',
+ 'Print screen service',
+ 'ACPI',
+ 'USB legacy',
+ 'BIOS boot specification',
+ 'Targeted content distribution',
+ 'UEFI'
+ ]
}
|
diff --git a/lib/index.d.ts b/lib/index.d.ts
index 552618e..e756431 100644
--- a/lib/index.d.ts
+++ b/lib/index.d.ts
@@ -38,6 +38,8 @@ export namespace Systeminformation {
version: string;
releaseDate: string;
revision: string;
+ language?: string;
+ features?: string[];
}
interface BaseboardData {
diff --git a/lib/system.js b/lib/system.js
index ab10641..5a89faf 100644
--- a/lib/system.js
+++ b/lib/system.js
@@ -452,9 +452,8 @@ function bios(callback) {
if (_linux || _freebsd || _openbsd || _netbsd) {
if (process.arch === 'arm') {
cmd = 'cat /proc/cpuinfo | grep Serial';
-
} else {
- cmd = 'export LC_ALL=C; dmidecode --type 0 2>/dev/null; unset LC_ALL';
+ cmd = 'export LC_ALL=C; dmidecode -t bios 2>/dev/null; unset LC_ALL';
}
exec(cmd, function (error, stdout) {
let lines = stdout.toString().split('\n');
@@ -463,6 +462,20 @@ function bios(callback) {
let datetime = util.getValue(lines, 'Release Date');
result.releaseDate = util.parseDateTime(datetime).date;
result.revision = util.getValue(lines, 'BIOS Revision');
+ let language = util.getValue(lines, 'Currently Installed Language').split('|')[0];
+ if (language) {
+ result.language = language;
+ }
+ if (lines.length && stdout.toString().indexOf('Characteristics:') >= 0) {
+ const features = [];
+ lines.forEach(line => {
+ if (line.indexOf(' is supported') >= 0) {
+ const feature = line.split(' is supported')[0].trim();
+ features.push(feature);
+ }
+ });
+ result.features = features;
+ }
// Non-Root values
const cmd = `echo -n "bios_date: "; cat /sys/devices/virtual/dmi/id/bios_date 2>/dev/null; echo;
echo -n "bios_vendor: "; cat /sys/devices/virtual/dmi/id/bios_vendor 2>/dev/null; echo;