From: Jo-Philipp Wich Date: Thu, 15 Jan 2015 11:17:21 +0000 (+0100) Subject: system: attempt to parse /proc/device-tree/model X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c48b19bbe127551ffb2b6d02b33ef78865341cfc;p=oweals%2Fprocd.git system: attempt to parse /proc/device-tree/model Fallback to /proc/device-tree/model if /tmp/sysinfo/model is not available. Signed-off-by: Jo-Philipp Wich --- diff --git a/system.c b/system.c index 1e88b5d..cdb5434 100644 --- a/system.c +++ b/system.c @@ -78,7 +78,8 @@ static int system_board(struct ubus_context *ctx, struct ubus_object *obj, fclose(f); } - if ((f = fopen("/tmp/sysinfo/model", "r")) != NULL) + if ((f = fopen("/tmp/sysinfo/model", "r")) != NULL || + (f = fopen("/proc/device-tree/model", "r")) != NULL) { if (fgets(line, sizeof(line), f)) {