system: add RISC-V CPU info
[project/procd.git] / system.c
index 93eac59c3b01ce3729dc27539ac483f5314759d3..1f2be330892ef451d21459c789b9a3863271030a 100644 (file)
--- a/system.c
+++ b/system.c
@@ -153,6 +153,12 @@ static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
                                blobmsg_add_string(&b, "system", line);
                                break;
                        }
+#elif __riscv
+                       if (!strcasecmp(key, "isa")) {
+                               snprintf(line, sizeof(line), "RISC-V (%s)", val + 2);
+                               blobmsg_add_string(&b, "system", line);
+                               break;
+                       }
 #else
                        if (!strcasecmp(key, "system type") ||
                            !strcasecmp(key, "processor") ||