From de724b6784cc734ffd77af8c1d39c9cd12bae706 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 16 Jan 2020 20:25:21 +0100 Subject: [PATCH] catch blkid error to get device for error message --- addon/lib/rmupdate.tcl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addon/lib/rmupdate.tcl b/addon/lib/rmupdate.tcl index f72fbce..f7bd948 100644 --- a/addon/lib/rmupdate.tcl +++ b/addon/lib/rmupdate.tcl @@ -319,8 +319,13 @@ proc ::rmupdate::get_partitions {{device ""}} { } } } - - set data3 [exec /sbin/blkid $part_dev] + + set data3 "" + if [catch { + set data3 [exec /sbin/blkid $part_dev] + } err] { + error "Command blkid failed for device ${part_dev}: ${err}" + } foreach d3 [split $data3 "\n"] { if {[regexp {LABEL="([^"]+)"} $d3 match lab]} { set partitions(${dev}::${num}::filesystem_label) $lab