From d0551c2dcd6feae9f272b8479013a59e64d31118 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 1 May 2021 02:53:03 +0200 Subject: [PATCH] web-admin: fix firmware partition name The rudimentary flash size determination function expects the partition for the devices firmware to be called "linux" while it is (since quite some time) "firmware". Fix this error to display available flash size as well as more useful error message in case the uploaded firmware image exceeds the flash space. Signed-off-by: David Bauer --- .../luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua index 9c42626d..0e7f0071 100644 --- a/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua +++ b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua @@ -72,7 +72,7 @@ local function action_upgrade(http, renderer) if unistd.access("/proc/mtd") then for l in io.lines("/proc/mtd") do local s, n = l:match('^[^%s]+%s+([^%s]+)%s+[^%s]+%s+"([^%s]+)"') - if n == "linux" then + if n == "firmware" then size = tonumber(s, 16) break end