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.
This commit is contained in:
matoro authored and GitHub committed 2023-10-23 23:37:37 +08:00
1 parent 48d2dbad34
commit fc0db8c291
1 file changed
+4
+4
View File
@@ -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))