From fc0db8c291a640f6ddbc7057a4a0cee4ff67d755 Mon Sep 17 00:00:00 2001 From: matoro Date: Mon, 23 Oct 2023 11:37:37 -0400 Subject: [PATCH] Host (Linux): devicetree path for OBP hosts (#591) At least SPARC devices have their model name in this devicetree node and do not have a "model" node. Possibly also POWER Macs, do not have one to test though. --- src/detection/host/host_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detection/host/host_linux.c b/src/detection/host/host_linux.c index 674d93b5e..269904eaf 100644 --- a/src/detection/host/host_linux.c +++ b/src/detection/host/host_linux.c @@ -28,6 +28,10 @@ static void getHostProductName(FFstrbuf* name) if(ffIsSmbiosValueSet(name)) return; + ffReadFileBuffer("/sys/firmware/devicetree/base/banner-name", name); + if(ffIsSmbiosValueSet(name)) + return; + //does a clear before the read ffReadFileBuffer("/tmp/sysinfo/model", name); if(ffIsSmbiosValueSet(name))