From 5518c6e98d218d72889160458a3b577007f5e131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Fri, 21 Jun 2024 19:24:12 +0900 Subject: =?UTF-8?q?Linux:=20=E3=83=9B=E3=82=B9=E3=83=88=E5=90=8D=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/host.c') diff --git a/src/host.c b/src/host.c index 77020ae..716a823 100644 --- a/src/host.c +++ b/src/host.c @@ -106,12 +106,12 @@ void display_host_model() { cmd1 = "getprop ro.product.brand"; cmd2 = "getprop ro.product.model"; } else if ( - access("/sys/devices/virtual/dmi/id/product_name", F_OK) != -1 || + access("/sys/devices/virtual/dmi/id/product_name", F_OK) != -1 && access("/sys/devices/virtual/dmi/id/product_version", F_OK) != 1 ) { cmd1 = "cat /sys/devices/virtual/dmi/id/product_name"; cmd2 = "cat /sys/devices/virtual/dmi/id/product_version"; - } else if (access("/sys/firmware/base/model", F_OK) != -1) { + } else if (access("/sys/firmware/devicetree/base/model", F_OK) != -1) { cmd1 = "cat /sys/firmware/devicetree/base/model"; } else if (access("/tmp/sysinfo/model", F_OK) != 1) { cmd1 = "cat /tmp/sysinfo/model"; -- cgit v1.2.3