summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-10 12:57:36 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-10 12:59:36 +0200
commitfbd356ce3a284d5445181f70e0f40572c81da66d (patch)
tree3f3f571d587addfcfba3537eb780f673da91ac7f
parenta88f8c72e7deea5a77776fe8c42454bac5d3437d (diff)
kflash: Fix flash partition label check
When checking labels for flash partitions, the partition device is created with an incorrect (and unset) variable name for the partition index. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xkflash.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/kflash.sh b/kflash.sh
index a83e84c..dd3a7d9 100755
--- a/kflash.sh
+++ b/kflash.sh
@@ -191,7 +191,7 @@ probe_device() {
local part_idx=${flash_part[0]}
local part_label=${flash_part[1]}
- local part_dev=/dev/${partdev}${i}
+ local part_dev=/dev/${partdev}${part_idx}
local label=$(blkid ${part_dev} -s PARTLABEL | sed 's/.*PARTLABEL="\([^"]*\)"$/\1/')
if [[ $label != ${part_label} ]] ; then