Fix serial number support for variscite boards

Closes: #1950

Change-type: patch
This commit is contained in:
Felipe Lalanne 2022-05-23 10:29:22 -04:00
parent 9549539eb2
commit 29867ccf17

View File

@ -78,6 +78,7 @@ export async function getSystemId(): Promise<string | undefined> {
const buffer = await Promise.any([
fs.readFile('/proc/device-tree/serial-number'),
fs.readFile('/proc/device-tree/product-sn'),
fs.readFile('/sys/devices/soc0/serial_number'),
]);
// Remove the null byte at the end
return buffer.toString('utf-8').replace(/\0/g, '');