summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-10 13:10:59 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-10 13:20:49 +0200
commitc14c03825bb617d8923d1c677a64a5a44ab48d4e (patch)
treef178fd89a5e325c9bef9c53306495b8fcb6d3e32
parent7df52204369d587df3dc321f12a1a5408afe66bd (diff)
kflash: Use lsblk instead of blkid
lsblk doesn't require root permisions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xkflash.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/kflash.sh b/kflash.sh
index e5f59ee..41dacb5 100755
--- a/kflash.sh
+++ b/kflash.sh
@@ -193,9 +193,9 @@ probe_device() {
local part_label=${flash_part[1]}
local part_dev=/dev/${partdev}${part_idx}
- local label=$(blkid ${part_dev} -o value -s PARTLABEL)
+ local label=$(lsblk -n -o PARTLABEL ${part_dev})
if [[ -z "$label" ]] ; then
- label=$(blkid ${part_dev} -o value -s LABEL)
+ label=$(lsblk -n -o LABEL ${part_dev})
fi
if [[ "$label" != ${part_label} ]] ; then