summaryrefslogtreecommitdiff
path: root/src/host.c
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-22 05:09:45 +0900
committer諏訪子 <suwako@076.moe>2024-06-22 05:09:45 +0900
commitbd0c69acc7f77c774ce21a990d186a8a249f2633 (patch)
tree94b2be19f43108109a13df41653f217d5672c4b5 /src/host.c
parent17341db8b3d73193e0b4ac8ae0c2a984d4ce10e7 (diff)
parent5518c6e98d218d72889160458a3b577007f5e131 (diff)
Merge branch 'master' of gitler.moe:suwako/farfetch
Diffstat (limited to 'src/host.c')
-rw-r--r--src/host.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host.c b/src/host.c
index 985b90a..8d35c5b 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";