From 0c8d7c2bd9d5604443657fac2363a873db95fee4 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sat, 28 Apr 2018 21:36:26 +0200 Subject: [PATCH] Fix version reading, filter /dev/ram devices --- addon/lib/rmupdate.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addon/lib/rmupdate.tcl b/addon/lib/rmupdate.tcl index a7d5b0d..e4f609a 100644 --- a/addon/lib/rmupdate.tcl +++ b/addon/lib/rmupdate.tcl @@ -279,6 +279,9 @@ proc ::rmupdate::get_partitions {{device ""}} { foreach d [split $data "\n"] { if {[regexp {Disk\s+(\S+):.*\s(\d+)\s+bytes} $d match dev size]} { + if {[regexp {/dev/ram} $dev]} { + continue + } set partitions(${dev}::0::partition) 0 set partitions(${dev}::0::disk_device) $dev set partitions(${dev}::0::model) "" @@ -1016,7 +1019,7 @@ proc ::rmupdate::get_current_firmware_version {} { } set data [read $fp] close $fp - regexp {\s*VERSION\s*=\s*([\d\.]+)\s*$} $data match current_version + regexp {\s*VERSION\s*=\s*([\d\.]+)\s*} $data match current_version return $current_version }