projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08938fe
)
cosmetics: provide compatible system info on Aarch64
author
Daniel Golle
<daniel@makrotopia.org>
Sat, 13 Feb 2021 20:56:27 +0000
(20:56 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Sat, 13 Feb 2021 21:20:29 +0000
(21:20 +0000)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
system.c
patch
|
blob
|
history
diff --git
a/system.c
b/system.c
index 0fb98f1e36221f262a55712aaf81924aaa4249bb..7855659d79710c9e742b1fd00d8c674f10cf738f 100644
(file)
--- a/
system.c
+++ b/
system.c
@@
-71,6
+71,13
@@
static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
if (!key || !val)
continue;
+#ifdef __aarch64__
+ if (!strcasecmp(key, "CPU revision")) {
+ snprintf(line, sizeof(line), "ARMv8 Processor rev %lu", strtoul(val + 2, NULL, 16));
+ blobmsg_add_string(&b, "system", line);
+ break;
+ }
+#else
if (!strcasecmp(key, "system type") ||
!strcasecmp(key, "processor") ||
!strcasecmp(key, "cpu") ||
@@
-84,6
+91,7
@@
static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
break;
}
}
+#endif
}
fclose(f);